• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[Trigger] Transmuting Items into Experoence points?Can it be done?

Status
Not open for further replies.

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,258
What he means obviously is he wants an ability to sacrifice items [Maybe at an alter?] to create exp for a hero.
Like. . .
Rusty Iron Sword (gives 5 damage while held and can cast rust poision every 180 secs)
Player then casts "Hidden Knowledge" on the Rusty Iron Sword .
The Rusty Iron Sword is destroyed (removed) and the casting hero gets 150 exp.

That is what I believe he is after. . .
 
Level 8
Joined
Dec 29, 2006
Messages
359
I'd go with something like

Item to XP
Events
Unit - A unit enters Altar 1 <gen>
Conditions
((Entering unit) is A Hero) Equal to True
Actions
Hero - Add (Item level of (Item carried by (Entering unit) in slot 1)) experience to (Entering unit), Hide level-up graphics
Hero - Add (Item level of (Item carried by (Entering unit) in slot 2)) experience to (Entering unit), Hide level-up graphics
Hero - Add (Item level of (Item carried by (Entering unit) in slot 3)) experience to (Entering unit), Hide level-up graphics
Hero - Add (Item level of (Item carried by (Entering unit) in slot 4)) experience to (Entering unit), Hide level-up graphics
Hero - Add (Item level of (Item carried by (Entering unit) in slot 5)) experience to (Entering unit), Hide level-up graphics
Hero - Add (Item level of (Item carried by (Entering unit) in slot 6)) experience to (Entering unit), Hide level-up graphics
Item - Remove (Item carried by (Entering unit) in slot 1)
Item - Remove (Item carried by (Entering unit) in slot 2)
Item - Remove (Item carried by (Entering unit) in slot 3)
Item - Remove (Item carried by (Entering unit) in slot 4)
Item - Remove (Item carried by (Entering unit) in slot 5)
Item - Remove (Item carried by (Entering unit) in slot 6)

Its a bit rough around the edges but i think id get the job done
 
Level 2
Joined
Dec 31, 2006
Messages
16
Hmmm I think this works but I have never tested it so.... but I think it will work.

Firs of all make a region near the altar on which you sac items. If you're gonna use ability to sac the item use this trigger:

Events
-A unit begins the effect of the ability

Conditions
-Ability being cast equal to [swordsacing]
-Unit has item of type[the sword for sacrificing] equal to true
-Region[altar] contains casting unit

Actions
-Play unit animation //or something of the like i don't remember...
-Remove[the sword for sacrificing]
-Add 150 exp to [casting unit]
-Display to [contrller of [casting unit]] the chat message - |cffffcc00You have sacrified this sword to gain 150 exp.|r // optional


Also you may have the sword to be able to sacrifice itself when u use it.
If you're gonna do so you have to add the experience gain ability [the one from the tome of exp] to your sword and make the sword actively used. Of course you may want to increase or decrease the exp gain from the tome so if you want yiou may change it.

Events
-A unit uses an item

Conditions
-Item being used is [the sword for sacrificing]

Actions
-Set variable: [sacing unit] equal to [unit used an item] //or something of that type
-Remove [the sword for sacrificing] from [sacing unit]
-Add 150 exp to [sacing unit]

this should also work. Anyway I wish you to finish you project sucsessfuly...:thumbs_up:
 
Level 1
Joined
Jul 11, 2006
Messages
6
you could give items the tome of experience ability with different exp modifiers and make the item charged, perishable, and actively used. This is probably the worst method because then an item cannot have an ability that can be "activated". You could also design a trigger so that when you sell the item it would give the selling unit (if it is a hero) experience.
 
Level 8
Joined
Sep 13, 2006
Messages
431
Easiest way in my opinion is as follows. Make an ability that targets an item and deals no damage, preferably with a cast range of about 90. Then use the following trigger:

Sacrafice
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Sacrafice
Actions
Hero - Add ((Item level of (Target item of ability being cast)) x 50) experience to (Casting unit), Show level-up graphics
Item - Remove (Target item of ability being cast)

Seems fairly simple to me, though I may have misunderstood completely...
 
Status
Not open for further replies.
Top