Damon
Check my status to contact me :)
Hello, I just started with lua,and here are my first scripts ,more to come!
First script: Change effect ; 26th January 2013
Tested [not yet]
When u rightclick on crystal coin and get 100platinum coins u also get this text message, which u can change
Second Script: "!buyitem" ; 26th January 2013
Tested [not yet]
Hello, here is my second script, which
Is supposed to let the player buy any item with a command you can specify choose (e.g. !buyitem) .
data/talkactions
Add to talkactions.xml
"!buyitem" is what the player has to say in order to buy the item, you may change it to w.e. U want , e.g. To "!buysword"
Create a new .lua at data/talkactions/scripts
and name it
Now paste this in buyitem.lua:
How to edit?!
Third Script:
ChangeSexForMoneyScript ; added 26th January 2013
Tested [not yet]
Hey, here is my next script
It is supposed to let players ChangeSex via Command!
e.g. !changesex
To talkactions.xml add:
To talkactions/scripts
Add "changesex.lua" :
The script is easy to configure
You can change the price , which is currently set to "5000" gold coins.
Just exchange "5000" with the amount of gp you want it to cost!
Regards,
//Damon
First script: Change effect ; 26th January 2013
Tested [not yet]
When u rightclick on crystal coin and get 100platinum coins u also get this text message, which u can change
Lua:
function onUse(cid, item, fromPosition, itemEx, toPosition)
if item.itemid == 2160 then
doPlayerSendTextMessage(cid,21,"You are rich ! You have transformed 1cc to 100 platinum coins !")
end
return TRUE
end
Second Script: "!buyitem" ; 26th January 2013
Tested [not yet]
Hello, here is my second script, which
Is supposed to let the player buy any item with a command you can specify choose (e.g. !buyitem) .
data/talkactions
Add to talkactions.xml
"!buyitem" is what the player has to say in order to buy the item, you may change it to w.e. U want , e.g. To "!buysword"
Code:
<talkaction words="!buyitem"
script="buyitem.lua" />
Create a new .lua at data/talkactions/scripts
and name it
.buyitem.lua
Now paste this in buyitem.lua:
Lua:
function onSay(cid, words, param)
if doPlayerRemoveMoney(cid, 10000) then
doPlayerAddItem(cid, 2160, 1)
else
doPlayerSendTextMessage(cid, 21, "You are too poor yeye, u mad now?")
end
return true
end
How to edit?!
"10000" can be changed to the amount of Gold coins the player has to pay for the item when using the command.
"2160,1" can be changed to whatever u like, just keep in mind it is:
"itemidofitemtheplayerwillrecive,amount"
Third Script:
ChangeSexForMoneyScript ; added 26th January 2013
Tested [not yet]
Hey, here is my next script
It is supposed to let players ChangeSex via Command!
e.g. !changesex
To talkactions.xml add:
Code:
<talkaction words="!changesex"
script="changesex.lua" />
To talkactions/scripts
Add "changesex.lua" :
Lua:
function onSay(cid, words, param) if doPlayerRemoveMoney(cid, 5000) == 1 then
doPlayerSetSex(cid, newSex)
end
end
The script is easy to configure
You can change the price , which is currently set to "5000" gold coins.
Just exchange "5000" with the amount of gp you want it to cost!
Regards,
//Damon
Last edited: