Jump to content
  • 0

(countitem(7060) < 1 || Zeny < 3000)


Onairda

Question


  • Group:  Members
  • Topic Count:  71
  • Topics Per Day:  0.03
  • Content Count:  167
  • Reputation:   8
  • Joined:  12/30/16
  • Last Seen:  

is this possible? If the player has the item 7060 in his inventory even though he don't have 3k zeny it will proceed. 

 

if (countitem(7060) < 1 || Zeny < 3000) {
        mes "[Helliaaah";
        mes "You do not have enough zeny.";
        mes "Kindly provide 3,000 zeny or 1pc Free Ticket for Kafra to proceed";
        close;
        }

warp to new city!

 

 

 

Edited by G-RO
Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  9
  • Topics Per Day:  0.00
  • Content Count:  477
  • Reputation:   269
  • Joined:  06/13/17
  • Last Seen:  

Using logical operator AND (&&) instead of OR (||) for this code.

AND && Operator

Spoiler

TRUE && TRUE = TRUE
TRUE && FALSE = FALSE
FALSE && TRUE = FALSE
FALSE && FALSE = FALSE

OR || Operator:

Spoiler

TRUE || TRUE = TRUE
TRUE || FALSE = TRUE
FALSE || TRUE = TRUE
FALSE || FALSE = FALSE


if (countitem(7060) < 1 && Zeny < 3000) 

if both are true. it will do the bracket of the IF statement. if any is false. it will skip the bracket

  • MVP 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...