MexeN
New Member
- Joined
- Sep 10, 2009
- Messages
- 22
- Reaction score
- 0
Tested on Tfs 8.7
Okay i know the images say Hawk but i forgot his password/mail and well i had to post it with this one
This is something like fable, and the rep system, but i dont like the rep system because when you want to kill someone and you
want to be good you will get bad, so i wont do that, in that way you will also be able to be pk being good
You will be able to use the stones whenever you want, and how you will get your level? by using the stones, if you are bad u can't use a good stone
and also if you're good you cant use an evil stone, you may trade the stones etc, you may be able to create spells depenending on you evil or good level i believe its a good idea C: Thanks
First Image and Code:
Depending on the statue you click, you will be good or evil
Good Statue
Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
local good = 10000
local neutral = 5000
if getPlayerStorageValue(cid, neutral) == -1 then
setPlayerStorageValue(cid, good, 5)
setPlayerStorageValue(cid, neutral, 1)
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Great!, Well Done! I'm glad, to see your good level just say !good")
else
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You have already choosen your destiny")
end
return true
end
Bad Statue
Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
local evil = 9999
local neutral = 5000
if getPlayerStorageValue(cid, neutral) == -1 then
setPlayerStorageValue(cid, evil, 5)
setPlayerStorageValue(cid, neutral, 1)
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Muahaha, You choosed to be bad, I'm glad, to see your evil level just say !evil")
else
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You have already choosen your destiny")
end
return true
end
got to your ot/data/actions/scripts/others
create a new file and name it goodstatue
make another and name it evil statue
Now go to actions.xml and add
Code:
<action actionid="12000" script="other/evilstatue.lua"/>
<action actionid="12001" script="other/goodstatue.lua"/>
Now a Talkaction that tells you your good level or your bad level
!Good
Code:
function onSay(cid, words)
local good = getPlayerStorageValue(cid,10000)
if isPlayer(cid) then
if getPlayerStorageValue(cid, 10000) > 1 then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "You Are Level "..good.." in goodness!.")
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "You Aren't Good.")
end
end
return true
end
Code:
function onSay(cid, words)
local bad = getPlayerStorageValue(cid,9999)
if getPlayerStorageValue(cid, 9999) > 1 then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "You Are Level "..bad.." in evilness!.")
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "You Aren't Bad.")
end
return true
end
Again go to talkactions and add good.lua and bad.lua
and on talkactions.xml you add:
Code:
<talkaction words="!good;/good" event="script" value="good.lua"/>
<talkaction words="!evil;/evil" event="script" value="bad.lua"/>
Now the script for the stones, the stones will gve you the level, you may put them for loot or quest
Good Stone
Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
local good = 10000
local evil = 9999
if getPlayerItemCount(cid, 8301) >= 1 and getPlayerStorageValue(cid, evil) <= 4 then
setPlayerStorageValue(cid, good, (getPlayerStorageValue(cid, good)) + 1)
doPlayerRemoveItem(cid, 8301, 1)
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Awsome, You gained an good level")
end
return true
end
Evil Stone
Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
local good = 10000
local evil = 9999
if getPlayerItemCount(cid, 8299) >= 1 and getPlayerStorageValue(cid, good) <= 4 then
setPlayerStorageValue(cid, evil, (getPlayerStorageValue(cid, evil)) + 1)
doPlayerRemoveItem(cid, 8299, 1)
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Muahaha, You gained an evil level")
end
return true
end
Again actions.xml and add:
Code:
<action itemid="8299" event="script" value="other/evilstone.lua"/>
<action itemid="8301" event="script" value="other/goodstone.lua"/>
I'll add more scripts later