• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Solved Spell changes gold to platinum

ziggy46802

Active Member
Joined
Aug 19, 2012
Messages
418
Reaction score
27
How would I go about making a simple spell that changes 105 gold coins into 1 platinum coin?

I looked at spells.xml and saw "conjurerune" and "conjurefood" and all this crazy stuff so I dont even know where to begin. Is it even possible?

Figured it out, and heres the scripting part of the spell if anyone wants to use it:

Code:
if getPlayerItemCount(cid, ITEM_GOLD_COIN) >= 105
			then
				doPlayerRemoveItem(cid, ITEM_GOLD_COIN, 105)
				doPlayerAddItem(cid, ITEM_PLATINUM_COIN, 1)	
	return true
end

Very simple script, but it may be useful to somebody that cant script at all I guess.
 
Last edited:
You should try by yourself, if you don't know how to do it,
It's time to learn how to, since you need scripting knowlegde to make anything in a server.
 
Yeah, I looked at the spells.xml and saw the runes as function="conjurerune" okay thats great wheres the file "conjurerune" huh? I'm ASKING, not TELLING, how would you go about getting a spell to use a script. If you just told me how to make a spell use a certain script, then I could easily make the script myself.

I did try.....

- - - Updated - - -

well hell, I figured it out and then some. I used TGYoshi's spell creator and made it look pretty cool. Thanks for the support tho there uhh Delita?
 
Well, I didnt did nothing.
Anyways, spell creators isnt a good way to do anything.. even more if you dont know how to do it.
Code:
function onCastSpell(cid, var)
The beginning is it.. after that you should check the player' gold coins and if theres more than 105 you should make remove the 105 gold coins and then make a platinum.
 
well yeah I wrote the part about having >= 105 gold coins and removing 105 and creating 1 platinum myself, the spellcreator cant do THAT custom type of stuff, I just used it to make a cool little animation around my guy when he change

Thank you Delita though for pushing me to do it myself. Thats the only way to really learn new things, to just do them and fail and keep doing it until you succeed. So thanks, I needed a little nudge on this one.
 
Last edited:
Back
Top