Jump to content
  • 0

Global Variable ?


orangethekid

Question


  • Group:  Members
  • Topic Count:  3
  • Topics Per Day:  0.00
  • Content Count:  5
  • Reputation:   0
  • Joined:  05/17/16
  • Last Seen:  

Hi. i'm looking a make a permanent global variable

my pupose is to make a server event.

1.every one must find a 'jellopy' and send to npc.

2.npc will keep all 'jellopy' from all players.

3.my goal is 1,000,000 'jellopy' or all player finish a quest 1,000,000 times. (repeat event)

4.when reach a goal server will make a bonus EXP rate or some thing else.

 

-so if i want to do this i must has a variable that keep all 'jellopy' from all player.

-is this must be keep in a database table if i want to make an anoucement on website ?

and one more question.

how to call a variable from conf/*_*.config such as  EXP rate / Drop rate

 

thank you :)

 

Link to comment
Share on other sites

4 answers to this question

Recommended Posts

  • 0

  • Group:  Developer
  • Topic Count:  48
  • Topics Per Day:  0.01
  • Content Count:  1443
  • Reputation:   344
  • Joined:  10/17/12
  • Last Seen:  

"$"      - A global permanent variable.
           They are stored by map-server in database table `mapreg`.


 $name  - permanent global integer variable

 

$Jellopy

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  3
  • Topics Per Day:  0.00
  • Content Count:  5
  • Reputation:   0
  • Joined:  05/17/16
  • Last Seen:  

42 minutes ago, Stolao said:

"$"      - A global permanent variable.
           They are stored by map-server in database table `mapreg`.


 $name  - permanent global integer variable

 

$Jellopy

Thanks.

i've try with a simple code but is seem my 'mapreg' is not update a value of $variable.

it's work while mapserv is runninig but when i shutdown it's become a default value.

Link to comment
Share on other sites

  • 0

  • Group:  Developer
  • Topic Count:  48
  • Topics Per Day:  0.01
  • Content Count:  1443
  • Reputation:   344
  • Joined:  10/17/12
  • Last Seen:  

1 minute ago, orangethekid said:

Thanks.

i've try with a simple code but is seem my 'mapreg' is not update a value of $variable.

it's work while mapserv is runninig but when i shutdown it's become a default value.

show your script

  • Upvote 1
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  3
  • Topics Per Day:  0.00
  • Content Count:  5
  • Reputation:   0
  • Joined:  05/17/16
  • Last Seen:  

i try by this one talk and add point.

mes "Now you have "+$gEvent+" event point.";
set $gEvent,$gEvent+1;
close;

 

edit : problem is solve. i change SQL engine into InnoDB and it work now.

Thank you

 

Edited by orangethekid
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...