Jump to content
The forums will be going offline for an extended maintenance period at 1400hrs GMT on 19th June 2025. The number of hours for this downtime is intentionally not advertised due to the nature of these upgrades. ×
  • 0

checking value to script to atcommand?


hakuren

Question


  • Group:  Members
  • Topic Count:  120
  • Topics Per Day:  0.02
  • Content Count:  295
  • Reputation:   6
  • Joined:  12/02/11
  • Last Seen:  

hello is this possible when an npc set a value example:

-------------------------------------------------

( On The Script )

set hehe,1; and the atcommand will check

-------------------------------------------------

( On The Atcommand Source )

if (hehe == 1) {

end;

}

is this possible?

Link to comment
Share on other sites

5 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  17
  • Topics Per Day:  0.00
  • Content Count:  754
  • Reputation:   186
  • Joined:  05/22/12
  • Last Seen:  

you can do this

if(pc_readglobalreg(sd, "hehe") == 1){
end;
}

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  7
  • Topics Per Day:  0.00
  • Content Count:  113
  • Reputation:   5
  • Joined:  06/06/12
  • Last Seen:  

hmm, set a value for what ? can you explain more what you're trying to accomplish ?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  120
  • Topics Per Day:  0.02
  • Content Count:  295
  • Reputation:   6
  • Joined:  12/02/11
  • Last Seen:  

  On 6/8/2012 at 6:19 AM, clydelion said:

you can do this

if(pc_readglobalreg(sd, "hehe") == 1){
end;
}

is this in the npc or in the source code?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  17
  • Topics Per Day:  0.00
  • Content Count:  754
  • Reputation:   186
  • Joined:  05/22/12
  • Last Seen:  

source code.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  120
  • Topics Per Day:  0.02
  • Content Count:  295
  • Reputation:   6
  • Joined:  12/02/11
  • Last Seen:  

  On 6/8/2012 at 6:19 AM, en_dev said:

hmm, set a value for what ? can you explain more what you're trying to accomplish ?

hmm let me give you an example:

when player 1 talk to npc 1 it will set the "set hehe,1;" and the atcommand example atcommand go will check it @go 1

"if ( hehe == 1 ) {"

"clif_displaymessage(fd, "Hehe is activated.");"

"}"

is this possible?

  On 6/8/2012 at 6:31 AM, clydelion said:

source code.

wooo it works! thank you clydelion ^_^

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...