Help - Search - Members - Calendar
Full Version: Restest More1
SphereServer Forums > Sphere .55i - Discontinued > Script Help 55i
Nostradamus
ok so heres my question, how can i have an npc check a player to see what an items MORE1 value is and if the player has it...the npc consumes it. just like a vendor but checking the more1 instead of the id. on the code below, i created some cats that need to be shrunk and brought to the npc.

CODE
ON=*collect*
ON=*reward*
ON=*reward*
ON=*finished*
ON=*complete*
ON=*done*
IF ((<SRC.RESTEST 1 c_cat_whisper> && (<SRC.RESTEST 1 c_cat_tiger>) && (<SRC.RESTEST 1 c_cat_mya> && (<SRC.RESTEST 1 c_cat_shirley>) && (<SRC.RESTEST 1 c_cat_lion> && (<SRC.RESTEST 1 c_cat_leopard>))
SRC.CONSUME 1 c_cat_whisper
SRC.CONSUME 1 c_cat_tiger
SRC.CONSUME 1 c_cat_mya
SRC.CONSUME 1 c_cat_shirley
SRC.CONSUME 1 c_cat_lion
SRC.CONSUME 1 c_cat_leopard
SAYU Whisper,Tiger,Mya,Shirley,Lion,Leopard! I Am So Happy To See Them! Thank You Here Is The Key I Promised. Take Caution Beyond This Gate!
SRC.NEWITEM=i_key_aliya
SRC.ACT.BOUNCE
ELSE
SAYU What! You Do Not Have My 6 Kittens?! Find Them Quickly!
ENDIF
Jdog
You can use FINDID for this.

Example:
CODE
IF (<SRC.FINDID(c_cat_whisper).MORE1>==1) && (<SRC.FINDID(c_cat_tiger).MORE1>==1) // Etc.
    // Code here.
ELSE
    // Code here.
ENDIF

This check should serve the purpose of checking for the item as well, considering it can't have a MORE1 property if doesn't exist. smile.gif
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2010 Invision Power Services, Inc.