Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Random Armour Generator
Author Message
htid4life
Journeyman
*

Posts: 162
Likes Given: 27
Likes Received: 4 in 3 posts
Joined: Mar 2012
Reputation: 2



Post: #1
Random Armour Generator
Hey on the old sphere forums there was a script i think it was buy soulless
that it completely added random armour on rare loot system or some thing for example


[ITEMDEF i_arms_rarearmour]
id=i_arms
name=Arms

on=@create
dorand
name=Arms of the gods
name=Arms of the devil
name=arms of copper
end

dorand
id=i_platemail_arms
id=i_ringmail_arms
end

dorand
modar=30
modar=40
end

dorand
color=03
color=05
color=06
end

and so on i know this is totaly wrong i used it as example any one got the script im looking for?

[Image: htid.jpg]
09-23-2012 11:06 PM
Find all posts by this user Like Post Quote this message in a reply
Extreme
Grandmaster Poster
***

Posts: 1,140
Likes Given: 217
Likes Received: 89 in 76 posts
Joined: May 2012
Reputation: 20

SphereCommunity

Post: #2
RE: Random Armour Generator
PHP Code:
DoRand x
 1
 2
 
..
 
x
EndDo 
Example:
PHP Code:
dorand 3
name
=Arms of the gods
name
=Arms of the devil
name
=arms of copper
enddo 

STEPS BEFORE CREATE A THREAD
- Check the revisions log;
- Use the search button and use the keywords of your problem;
- Check the WIKI;
- Create a thread.
09-24-2012 12:19 AM
Find all posts by this user Like Post Quote this message in a reply
Skul
Master
**

Posts: 413
Likes Given: 0
Likes Received: 19 in 15 posts
Joined: Jun 2012
Reputation: 9



Post: #3
RE: Random Armour Generator
set a local, and read it to determine which type of armor it will be
Code:
local.rnd=<eval {1 1 2 5 3 10}>
if (<dlocal.rnd>==1)
  name=arms of god
  dispid=i_platemail_arms
  modar=30
  color=03
elseif (<dlocal.rnd>==2)
  name=arms of devil
  dispid=i_ringmail_arms
  modar=40
  color=05
elseif (<dlocal.rnd>==3)
  name=arms of copper
  dispid=i_ringmail_arms
  modar=40
  color=06
endif
update

"I ask a question to the answer I already know."

Marchadium :: http://www.marchadium.ca/ :: Join us!
09-24-2012 12:42 AM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
htid4life
Journeyman
*

Posts: 162
Likes Given: 27
Likes Received: 4 in 3 posts
Joined: Mar 2012
Reputation: 2



Post: #4
RE: Random Armour Generator
Hey Thanks for the replys but i got abit of a problem

When i create the armor it gives me random luck every time i drag and drop it meaning luck changes all time when i equip it

Code:
[ITEMDEF i_rare_legs]
TYPE=T_ARMOR
WEIGHT=7
ARMOR=5
REQSTR=50
CATEGORY=Anthony
SUBSECTION=Rare
DESCRIPTION=Legs



ON=@Create
MOREY=100.0
ATTR=attr_magic
HITPOINTS=300
EVENTS=t_modar
EVENTS=t_luck_item

local.rnd=<eval {1 1 2 1 3 1 4 1 5 1 6 1 7 1 8 1 9 1 10 1 11 1 12 1 13 1 14 1 15 1}>
if (<dlocal.rnd>==1)
  name=Devil Legs
  id=i_platemail_leggings
  tag.devilarmor=1
  type=t_armor
  modar=12
  color=0a93
  tag.luck=40
elseif (<dlocal.rnd>==2)
  name=Angel Legs
  type=t_armor
  tag.angelarmor=1
  id=i_platemail_leggings
  modar=12
  color=080e
tag.luck={1 100}
elseif (<dlocal.rnd>==3)
  name=Dragon legs
  type=t_armor
  tag.dragonarmor=1
  id=i_platemail_leggings
  modar=11
  color=0b99
tag.luck={1 100}
elseif (<dlocal.rnd>==4)
  name=Ettin legs
  type=t_armor
  tag.ettinarmor=1
  id=i_platemail_leggings
  modar=4
  color=0a94
tag.luck={1 100}
elseif (<dlocal.rnd>==5)
  name=Legs Of The Beast
  type=t_armor
  id=i_platemail_leggings
  modar=1
  color=047e
tag.luck={1 100}
elseif (<dlocal.rnd>==6)
  name=Dark legs
  type=t_armor
  id=i_platemail_leggings
  modar=3
  color=0a6f
tag.luck={1 100}
elseif (<dlocal.rnd>==7)
  name=Myter legs
  type=t_armor
  id=i_platemail_leggings
  modar=1
  color=0a75
tag.luck={1 100}
elseif (<dlocal.rnd>==8)
  name=Mystic legs
  type=t_armor
  id=i_platemail_leggings
  modar=2
  color=0a35
tag.luck={1 100}
elseif (<dlocal.rnd>==9)
  name=Xperian legs
  type=t_armor
  id=i_platemail_leggings
  modar=3
  color=0a23
tag.luck={1 100}
elseif (<dlocal.rnd>==10)
  name=Dread legs
  type=t_armor
  id=i_platemail_leggings
  modar=4
  color=0818
tag.luck={1 100}
elseif (<dlocal.rnd>==11)
  name=Balron legs
  tag.balronarmor=1
  type=t_armor
  id=i_platemail_leggings
  modar=5
  color=0817
tag.luck={1 100}
elseif (<dlocal.rnd>==12)
  name=Carbon legs
  type=t_armor
  id=i_platemail_leggings
  modar=6
  color=07
tag.luck={1 100}
elseif (<dlocal.rnd>==13)
  name=Ruin legs
  type=t_armor
  id=i_platemail_leggings
  modar=8
  color=054b
tag.luck={1 100}
elseif (<dlocal.rnd>==14)
  name=Power legs
  type=t_armor
  tag.powerarmor=1
  id=i_platemail_leggings
  modar=9
  color=056b
tag.luck={1 100}
elseif (<dlocal.rnd>==15)
  name=Vanq legs
  type=t_armor
  id=i_platemail_leggings
  modar=15
  tag.vanqlarmor=1
  color=0813
tag.luck={100 180}
endif
update

[Image: htid.jpg]
09-26-2012 09:13 PM
Find all posts by this user Like Post Quote this message in a reply
Mordaunt
Super Moderator
****

Posts: 1,237
Likes Given: 26
Likes Received: 55 in 43 posts
Joined: Mar 2012
Reputation: 35



Post: #5
RE: Random Armour Generator
Because you told it to....

Tag.luck {1 100} randomised it *slap*

[Image: 2nis46r.jpg]
09-26-2012 09:51 PM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
htid4life
Journeyman
*

Posts: 162
Likes Given: 27
Likes Received: 4 in 3 posts
Joined: Mar 2012
Reputation: 2



Post: #6
RE: Random Armour Generator
so ur telling me every time i drag a Already created piece of armor it fires on=@create again???

[Image: htid.jpg]
09-26-2012 09:53 PM
Find all posts by this user Like Post Quote this message in a reply
RanXerox
Master
**

Posts: 550
Likes Given: 1
Likes Received: 12 in 9 posts
Joined: Dec 2010
Reputation: 19



Post: #7
RE: Random Armour Generator
Perhaps you are setting the value of the TAG to literally "{1 100}" (since a TAG is a string by nature)... try TAG.LUCK=<R1,100> or maybe <EVAL <R1,100>>
(This post was last modified: 09-26-2012 11:55 PM by RanXerox.)
09-26-2012 11:54 PM
Find all posts by this user Like Post Quote this message in a reply
htid4life
Journeyman
*

Posts: 162
Likes Given: 27
Likes Received: 4 in 3 posts
Joined: Mar 2012
Reputation: 2



Post: #8
RE: Random Armour Generator
Thanks guys im usng

tag.luck=<EVAL <R1,100>> and its working like a charm thanks again

[Image: htid.jpg]
09-27-2012 04:44 AM
Find all posts by this user Like Post Quote this message in a reply
admin phoenix
Master
**

Posts: 354
Likes Given: 1
Likes Received: 23 in 13 posts
Joined: Mar 2012
Reputation: 3



Post: #9
RE: Random Armour Generator
should it not be
<eval {R1,100}>

????
10-02-2012 10:28 PM
Find all posts by this user Like Post Quote this message in a reply
Extreme
Grandmaster Poster
***

Posts: 1,140
Likes Given: 217
Likes Received: 89 in 76 posts
Joined: May 2012
Reputation: 20

SphereCommunity

Post: #10
RE: Random Armour Generator
(10-02-2012 10:28 PM)admin phoenix Wrote:  should it not be
<eval {R1,100}>

????
No no, <R1,100> or <EVAL <R1,100>> or <EVAL RAND(1,100)>

STEPS BEFORE CREATE A THREAD
- Check the revisions log;
- Use the search button and use the keywords of your problem;
- Check the WIKI;
- Create a thread.
10-02-2012 11:57 PM
Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)