mattyboi88
New Member
- Joined
- Jun 12, 2009
- Messages
- 86
- Reaction score
- 0
Hey there otlanders, Ive been working on a script =) probably quite a few of them around, but i thought i would share mine with you.
Ok first of all go to talkactions/scripts and make a file called "test.lua" in that file add the following,
function onSay(cid, words, param)
if getPlayerItemCount(cid, 8886) >= 1 then
doPlayerRemoveItem(cid,8886,1)
doAddPoints(cid, 8)
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You have exchanged your upgraded knights armor for 8 points.")
else
doPlayerSendCancel(cid, "You don't have an upgraded knights armor!")
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF)
Then in talkactions.xml add the following.
<talkaction log="yes" words="!knightupgrade" script="test.lua"/>
Im sorry its a bit messy, havnt used Otlands much, the whole idea is for donations etc... you can trade a donation item back for points using a talkaction, tested and working on TFS 0.3.4, I hope you enjoy, any repp+ or comments would be real nice, thanks.
Ok first of all go to talkactions/scripts and make a file called "test.lua" in that file add the following,
function onSay(cid, words, param)
if getPlayerItemCount(cid, 8886) >= 1 then
doPlayerRemoveItem(cid,8886,1)
doAddPoints(cid, 8)
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You have exchanged your upgraded knights armor for 8 points.")
else
doPlayerSendCancel(cid, "You don't have an upgraded knights armor!")
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF)
Then in talkactions.xml add the following.
<talkaction log="yes" words="!knightupgrade" script="test.lua"/>
Im sorry its a bit messy, havnt used Otlands much, the whole idea is for donations etc... you can trade a donation item back for points using a talkaction, tested and working on TFS 0.3.4, I hope you enjoy, any repp+ or comments would be real nice, thanks.