Archived copy of warcraft-source.com, the Warcraft: Source (WCS) forum (2007–2011), rebuilt from the Internet Archive by wc3mods.net. This page was captured on 2010-09-01 (original capture). Home · Forum · All archived topics · Downloads

Author Topic: Approved~ [Shopitem] Random Tome of XP  (Read 339 times)

-SJ. Mr.BrightSide

  • Level 3 Trained Apprentice
  • Posts: 77
Approved~ [Shopitem] Random Tome of XP
« on: July 18, 2010, 07:22:21 AM »
i didnt code this [Oddity]TeacherCreature did   
but what it does is when some 1 buys it they get ramdon exp 100-200

Code: [Select]
"x"
  {
  "name"        "Random Tome"
  "description" "Random XP"
  "category"    "x"
  "cost"        "x"
  "level"       "0"
  "dab"         "2"
  "duration"    "0"
  "maxamount"   "0"
  "itemconfig"  "player_buy"
  "cmdbuy"      "es_rand wcs_tmp 1 4;es wcs_givexp event_var(userid) server_var(wcstmp) 0 1"
  "cmdactivate" "0"
}

 if u wanna change the range of the ramdom exp the limit's are 1 - 999  and all u have to do is change the 100 and 200 in this line

"cmdbuy"      "es_rand wcs_tmp 100 200;es wcs_givexp event_var(userid) server_var(wcstmp) 0 1"
« Last Edit: July 21, 2010, 02:54:30 AM by brightside112 »



MiB

  • Custom Coder
  • Level 7 Expert
  • Posts: 1039
Re: Ramdom buy
« Reply #1 on: July 18, 2010, 07:44:58 AM »
if u wanna change the range of the ramdom exp the limit's are 1 - 999
You do know there is no limit on es_rand command.
You could just do es_rand wcs_tmp -899999 999999 if you wanted.

~The Sig Changes Each Time~
~The Sigs Them Selfs Are By Hybrid Click The Sigs To See His Other Sigs~

Muse

  • Level 7 Expert
  • Posts: 427
  • The lord of drunken bears, 102 lvl.
Re: Ramdom buy
« Reply #2 on: July 18, 2010, 08:39:37 AM »
"cmdbuy"      "es_rand wcs_tmp 4 8;es_xmath wcs_tmp * 25;es wcs_givexp event_var(userid) server_var(wcs_tmp) 0 1"
« Last Edit: July 18, 2010, 08:51:21 AM by Muse »
Лет'с толк ин личку ин рашен.
Who`ll dare to face me?
I wanna spend all your money at the gay bar, gay bar, gay bar.
oh.. you touch my talala )

MiB

  • Custom Coder
  • Level 7 Expert
  • Posts: 1039
Re: Ramdom buy
« Reply #3 on: July 18, 2010, 08:41:07 AM »
"cmdbuy"      "es_rand wcs_tmp 4 8;es_xmath wcs_tmp * 25;es wcs_givexp event_var(userid) server_var(wcstmp) 0 1"
I'm confused by you not posting a statement.

~The Sig Changes Each Time~
~The Sigs Them Selfs Are By Hybrid Click The Sigs To See His Other Sigs~

Muse

  • Level 7 Expert
  • Posts: 427
  • The lord of drunken bears, 102 lvl.
Re: Ramdom buy
« Reply #4 on: July 18, 2010, 08:50:57 AM »
Quote
hi was going to make a shopmenu item that will ramdom give 100exp 125 exp 150 exp or 200 exp but how would i set up the wcs_dice (if that is the command)

Oh, ye forget about this.

Code: [Select]
"cmdbuy"      "es_rand wcs_tmp 4 8;es_xmath wcs_tmp * 25;es wcs_givexp event_var(userid) server_var(wcs_tmp) 0 1"This for 100 125 150 175 and 200
Without 175 this will be:

Code: [Select]
"cmdbuy"      "es_xrand wcs_tmp 1 4;if (server_var(wcs_tmp) = 1) then es_set wcs_tmp 100;if (server_var(wcs_tmp) = 2) then es_set wcs_tmp 125;if (server_var(wcs_tmp) = 3) then es_set wcs_tmp 150;if (server_var(wcs_tmp) = 4) then es_set wcs_tmp 200;es wcs_givexp event_var(userid) server_var(wcs_tmp) 0 1"
« Last Edit: July 18, 2010, 09:02:46 AM by Muse »
Лет'с толк ин личку ин рашен.
Who`ll dare to face me?
I wanna spend all your money at the gay bar, gay bar, gay bar.
oh.. you touch my talala )

[Oddity]TeacherCreature

  • Moderator
  • Level 7 Expert
  • Posts: 1714
Re: Ramdom buy
« Reply #5 on: July 18, 2010, 04:20:04 PM »
muse likes nice neat numbers so he is offering them, I prefer to embrace the chaos

-SJ. Mr.BrightSide

  • Level 3 Trained Apprentice
  • Posts: 77
Re: Ramdom buy
« Reply #6 on: July 18, 2010, 07:58:05 PM »
no i didnt i thoght it was 1 - 999 ty for the info :D
« Last Edit: July 19, 2010, 11:31:44 PM by brightside112 »



Scyther

  • Level 4 Intermediate
  • Posts: 92
  • <3 WCS :)
Re: Approved~ [Shopitem] Random Tome of XP
« Reply #7 on: August 28, 2010, 01:56:26 AM »
Mine just says you have brought a tome of random exp but nothing happens.. :S