Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Multiple RESTEST? [SOLVED]
Author Message
x77x
Master
**

Posts: 488
Likes Given: 0
Likes Received: 15 in 15 posts
Joined: Mar 2012
Reputation: -4



Post: #1
Multiple RESTEST? [SOLVED]
how do i check to if a player has too many of one item?


Code:
[TRIG 1751]
// TEST
ONTRIGGER=DCLICK
IF (<SRC.RESTEST 0xx77> < 6) && (<SRC.TARG.DISTANCE> < 2)
    SRC.NEWITEM=0xx77
    SRC.ACT.BOUNCE    // put it in your pack.
    RETURN 1
    ELSE
    SRC.SYSMESSAGE=You have too many that item or are too far away.
    ENDIF

whats the right way to do this?

if you have more than 5 of item 0xx77
"you have too many of that item"

if you are too far away
"you are too far away"

know what im sayin?
thx

Dragons of Time 2000-2020
http://dragonsoftime.com
(This post was last modified: 03-29-2013 10:51 AM by x77x.)
03-28-2013 12:24 PM
Find all posts by this user Like Post Quote this message in a reply
amonvangrell
Banned

Posts: 338
Likes Given: 17
Likes Received: 32 in 20 posts
Joined: Aug 2012

britannia shard

Post: #2
RE: Multiple RESTEST?
I don`t understand your question, because your function is working:

[itemdef teste]
defname=teste
id=i_robe
name= teste
// TEST
type=t_normal

ON=@DCLICK
IF (<SRC.RESTEST i_robe> < 1) && (<SRC.TARG.DISTANCE> < 2)
SRC.NEWITEM=i_robe
SRC.ACT.BOUNCE // put it in your pack.
RETURN 1
ELSE
SRC.SYSMESSAGE=You have too many that item or are too far away.
return 1
ENDIF
03-28-2013 01:08 PM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
admin phoenix
Master
**

Posts: 354
Likes Given: 1
Likes Received: 23 in 13 posts
Joined: Mar 2012
Reputation: 3



Post: #3
RE: Multiple RESTEST?
It seems that itis a 51a script

[TRIG 1751] <-- old code
// TEST
ONTRIGGER=DCLICK <-- old code
03-28-2013 04:23 PM
Find all posts by this user Like Post Quote this message in a reply
Mordaunt
Super Moderator
****

Posts: 1,237
Likes Given: 26
Likes Received: 55 in 43 posts
Joined: Mar 2012
Reputation: 35



Post: #4
RE: Multiple RESTEST?
While I understand the frustration at the limited assistance available for the 51a the fact remains that this version is ancient and not officially supported.
There have been so many changes since 51a that anyone still around who has used (I am one who has) may not even necessarily remember much to do with it (Though im my case senility is equally likely)

We have a forum for the 51a emulator, as I know you are aware, so please do not bring 51a questions to the 56b section as it will only lead to confusion.

Moving thread to 51a forum

[Image: 2nis46r.jpg]
03-28-2013 10:51 PM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
Mulambo
Apprentice
*

Posts: 22
Likes Given: 0
Likes Received: 1 in 1 posts
Joined: Mar 2012
Reputation: 0

Dark Paradise

Post: #5
RE: Multiple RESTEST?
why don't you just restest for 5 items of that type and if its true then stop the trigger?
Code:
IF (<SRC.RESTEST 5 0xx77>)
will proc if u have 5, 50 or million

Wars come and go, but my soldiers stay ethernal.

I broke the dam

Czech Shard Dark Paradise
03-29-2013 03:47 AM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
x77x
Master
**

Posts: 488
Likes Given: 0
Likes Received: 15 in 15 posts
Joined: Mar 2012
Reputation: -4



Post: #6
RE: Multiple RESTEST?
as long as no one brings up FUNCTION, alot of the syntax is still the same...
thats why it went in the 56b section


this is what i was getting at...


Code:
[TRIG 1751]
// TEST
ONTRIGGER=DCLICK
    IF <SRC.RESTEST 5 07725>
    SRC.SYSMESSAGE=You have too many grenades.
    RETURN 1
    ELSE
    IF <SRC.TARG.DISTANCE>>2
    SRC.SYSMESSAGE=You are too far away.
    RETURN 1
    ELSE
    SRC.NEWITEM=07725
    SRC.ACT.BOUNCE    // put it in your pack.
    RETURN 1
    ENDIF


THANK YOU MULAMBO! =)

Dragons of Time 2000-2020
http://dragonsoftime.com
(This post was last modified: 03-29-2013 10:36 AM by x77x.)
03-29-2013 10:08 AM
Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)