Hello scripters!
Is there anyone who could help me with 3 scripts:
1) teleportation between cities - access 1 (for players):
I tried using the god`s script : '/ t', but I couldn`t , so I decided to write here, if I can`t find a solution on the internet.
2) I would like to save a lvl:
I will say for example:
We start with 100 lvl on war ots. Kill someone and we get for example 5 lvls. So we have 105 lvl now. After that we die. And here I would like to make this 105 lvl hasn`t disappeared after death or after relog.
3) When I click on the character to see his nickname, I would like to see the number of kills and deaths next to nick
Thanks in advance for your time Regards
Is there anyone who could help me with 3 scripts:
1) teleportation between cities - access 1 (for players):
I tried using the god`s script : '/ t', but I couldn`t , so I decided to write here, if I can`t find a solution on the internet.
2) I would like to save a lvl:
I will say for example:
We start with 100 lvl on war ots. Kill someone and we get for example 5 lvls. So we have 105 lvl now. After that we die. And here I would like to make this 105 lvl hasn`t disappeared after death or after relog.
3) When I click on the character to see his nickname, I would like to see the number of kills and deaths next to nick
Thanks in advance for your time Regards
Pont 1: I made something like that
The purpose of the script is random sending player to 1 from 3 avaliable locations ( 3 different cities on my war map ots).
But there is a problem, and i have no idea how could I repear that. Please help for beginner in .lua skripting
in:
'...\data\talkative\scripts' I`ve made a file: 'tp.lua':
function onSay(cid, words, param, channel)
local effect = 121 ---- effect for tp
local exh = 1 --- how often i can use command
local storage = 1429
local text = "/m" ---- the words to start skript
rd = math.random(1, 3) -- random picking of locations to sen
local tp1 = {x=1000, y=1000, z=7} --- first location to teleport (tp1)
local tp2 = {x=1002, y=1003, z=7} --- location for tp2
local tp3 = {x=1004, y=1005, z=7} --- location for tp3
if(getPlayerStorageValue(cid,storage) <= os.time()) and getPlayerAccess(cid) >= 1 and getPlayerLevel(cid) >= 1 then
doSendMagicEffect(getPlayerPosition(cid), effect)
setPlayerStorageValue(cid,storage,os.time()+exh)
doSendAnimatedText(hitpos,text,TEXTCOLOR_PINK)
if rd == 1 then
doTeleportThing(cid,tp1)
elseif rd == 2 then
doTeleportThing(cid,tp2)
elseif rd == 3 then
doTeleportThing(cid,tp3)
else
return doPlayerSendCancel(cid, 'I`m tired...')
end
return true
end
end
After that, in:
'...\data\talkative\talkative.xml' ,
I added this line:
<talkaction words="/m" script="tp.lua" />
The resoult which i can see is red " /m" in window chat, and comment :
" Sorry, not possible."
How should i remake this script to make it working on my 8.6 war ots ?
The purpose of the script is random sending player to 1 from 3 avaliable locations ( 3 different cities on my war map ots).
But there is a problem, and i have no idea how could I repear that. Please help for beginner in .lua skripting
in:
'...\data\talkative\scripts' I`ve made a file: 'tp.lua':
function onSay(cid, words, param, channel)
local effect = 121 ---- effect for tp
local exh = 1 --- how often i can use command
local storage = 1429
local text = "/m" ---- the words to start skript
rd = math.random(1, 3) -- random picking of locations to sen
local tp1 = {x=1000, y=1000, z=7} --- first location to teleport (tp1)
local tp2 = {x=1002, y=1003, z=7} --- location for tp2
local tp3 = {x=1004, y=1005, z=7} --- location for tp3
if(getPlayerStorageValue(cid,storage) <= os.time()) and getPlayerAccess(cid) >= 1 and getPlayerLevel(cid) >= 1 then
doSendMagicEffect(getPlayerPosition(cid), effect)
setPlayerStorageValue(cid,storage,os.time()+exh)
doSendAnimatedText(hitpos,text,TEXTCOLOR_PINK)
if rd == 1 then
doTeleportThing(cid,tp1)
elseif rd == 2 then
doTeleportThing(cid,tp2)
elseif rd == 3 then
doTeleportThing(cid,tp3)
else
return doPlayerSendCancel(cid, 'I`m tired...')
end
return true
end
end
After that, in:
'...\data\talkative\talkative.xml' ,
I added this line:
<talkaction words="/m" script="tp.lua" />
The resoult which i can see is red " /m" in window chat, and comment :
" Sorry, not possible."
How should i remake this script to make it working on my 8.6 war ots ?