1. Autor - Blizzar?aviD.
2. Opis - Po stani?ciu na kratk? jest szansa(ustalona w skrypcie) na to, ?e skrypt w imieniu gracza napisze ustalony tekst.
3. Klient - Testowany na 8.6, ale bezproblemowo dzia?a? b?dzie na innych wersjach.
4. Skrypt
[LUA]local config = {
[1234] = {text = 'cos cos cos', -- wiadomo?? jaka zostanie wys?ana
effect = CONST_ME_FIREAREA, --mo?na usun??, je?li nie chce si? u?ywa?
chance = 50 -- szansa w %
},
[1235] = {text = 'cos cos cos', -- wiadomo?? jaka zostanie wys?ana
effect = CONST_ME_FIREAREA, --mo?na usun??, je?li nie chce si? u?ywa?
chance = 50 -- szansa w %
}
}
function onStepIn(cid, item, position, fromPosition)
local tileByItemAid = config[item.actionid]
if tileByItemAid and isPlayer(cid) and math.random(100) <= tileByItemAid.chance then
doCreatureSay(cid, tileByItemAid.text, TALKTYPE_SAY)
return tileByItemAid.effect and doSendMagicEffect(position, tileByItemAid.effect) or true
end
return true
end [/LUA]
Oraz do movements.xml:
[XML]<movevent event="StepIn" actionid="1234-1235" script="skrypt.lua"/>[/XML]
2. Opis - Po stani?ciu na kratk? jest szansa(ustalona w skrypcie) na to, ?e skrypt w imieniu gracza napisze ustalony tekst.
3. Klient - Testowany na 8.6, ale bezproblemowo dzia?a? b?dzie na innych wersjach.
4. Skrypt
[LUA]local config = {
[1234] = {text = 'cos cos cos', -- wiadomo?? jaka zostanie wys?ana
effect = CONST_ME_FIREAREA, --mo?na usun??, je?li nie chce si? u?ywa?
chance = 50 -- szansa w %
},
[1235] = {text = 'cos cos cos', -- wiadomo?? jaka zostanie wys?ana
effect = CONST_ME_FIREAREA, --mo?na usun??, je?li nie chce si? u?ywa?
chance = 50 -- szansa w %
}
}
function onStepIn(cid, item, position, fromPosition)
local tileByItemAid = config[item.actionid]
if tileByItemAid and isPlayer(cid) and math.random(100) <= tileByItemAid.chance then
doCreatureSay(cid, tileByItemAid.text, TALKTYPE_SAY)
return tileByItemAid.effect and doSendMagicEffect(position, tileByItemAid.effect) or true
end
return true
end [/LUA]
Oraz do movements.xml:
[XML]<movevent event="StepIn" actionid="1234-1235" script="skrypt.lua"/>[/XML]