• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Need help with scripts :D THANKS

jajo776

New Member
Joined
Aug 27, 2015
Messages
40
Reaction score
2
Hi, i need help with that scripts. When i use item again then all this player storages being deleted. Problem is with effect because when i use item second time my effect doesnt change. I would like that when i click on item second time then my effect being changed again.

Sorry for my English.

Thank you all of you for your help
local config =
{
storage = 31520,
timee = 1, -- po jakim czasie zostaje wyswietlony efekt
efekt1 = 29,
efekt2 = 118,
efekt3 = 124,
}

function onThink(cid, interval)
if (getPlayerVocation(cid) == 17 or getPlayerVocation(cid) == 23 or getPlayerVocation(cid) == 29 or getPlayerVocation(cid) == 35 or getPlayerVocation(cid) == 41
or getPlayerVocation(cid) == 47 or getPlayerVocation(cid) == 53 or getPlayerVocation(cid) == 59 or getPlayerVocation(cid) == 65 or getPlayerVocation(cid) == 71
or getPlayerVocation(cid) == 77 or getPlayerVocation(cid) == 83 or getPlayerVocation(cid) == 89 or getPlayerVocation(cid) == 95 or getPlayerVocation(cid) == 101
or getPlayerVocation(cid) == 107 or getPlayerVocation(cid) == 113 or getPlayerVocation(cid) == 121 or getPlayerVocation(cid) == 125 or getPlayerVocation(cid) == 140 or getPlayerVocation(cid) == 294 or getPlayerVocation(cid) == 309 or getPlayerVocation(cid) == 313)
and exhaustion.get(cid, config.storage) == false then
doSendMagicEffect(getPlayerPosition(cid),config.efekt1)
exhaustion.set(cid,config.storage,config.timee)
----------------------------------------------------------------------
elseif (getPlayerVocation(cid) == 199 or getPlayerVocation(cid) == 203 or getPlayerVocation(cid) == 207 or getPlayerVocation(cid) == 211 or getPlayerVocation(cid) == 215 or getPlayerVocation(cid) == 219
or getPlayerVocation(cid) == 223 or getPlayerVocation(cid) == 227 or getPlayerVocation(cid) == 231 or getPlayerVocation(cid) == 235 or getPlayerVocation(cid) == 239 or getPlayerVocation(cid) == 243
or getPlayerVocation(cid) == 247 or getPlayerVocation(cid) == 251 or getPlayerVocation(cid) == 255 or getPlayerVocation(cid) == 259 or getPlayerVocation(cid) == 263 or getPlayerVocation(cid) == 267
or getPlayerVocation(cid) == 271 or getPlayerVocation(cid) == 301 or getPlayerVocation(cid) == 315)
and exhaustion.get(cid, config.storage) == false then
if (getCreatureStorage(cid, 50036)==1) then
if getPlayerStorageValue(cid,50002) == 1 then
doSendMagicEffect(getPlayerPosition(cid),122)
elseif getPlayerStorageValue(cid,50003) == 1 then
doSendMagicEffect(getPlayerPosition(cid),131)
elseif getPlayerStorageValue(cid,50004) == 1 then
doSendMagicEffect(getPlayerPosition(cid),168)
elseif getPlayerStorageValue(cid,50005) == 1 then
doSendMagicEffect(getPlayerPosition(cid),169)
elseif getPlayerStorageValue(cid,50006) == 1 then
doSendMagicEffect(getPlayerPosition(cid),116)
elseif getPlayerStorageValue(cid,50007) == 1 then
doSendMagicEffect(getPlayerPosition(cid),130)
elseif getPlayerStorageValue(cid,50008) == 1 then
doSendMagicEffect(getPlayerPosition(cid),300)
elseif getPlayerStorageValue(cid,50009) == 1 then
doSendMagicEffect(getPlayerPosition(cid),301)
elseif getPlayerStorageValue(cid,50009) == 1 then
doSendMagicEffect(getPlayerPosition(cid),303)
elseif getPlayerStorageValue(cid,50010) == 1 then
doSendMagicEffect(getPlayerPosition(cid),304)
elseif getPlayerStorageValue(cid,50011) == 1 then
doSendMagicEffect(getPlayerPosition(cid),309)
end
exhaustion.set(cid,config.storage,config.timee)
else
doSendMagicEffect(getPlayerPosition(cid),config.efekt2)
exhaustion.set(cid,config.storage,config.timee)
end
----------------------------------------------------------------------
elseif (getPlayerVocation(cid) == 201 or getPlayerVocation(cid) == 205 or getPlayerVocation(cid) == 209 or getPlayerVocation(cid) == 213 or getPlayerVocation(cid) == 217 or getPlayerVocation(cid) == 221
or getPlayerVocation(cid) == 225 or getPlayerVocation(cid) == 229 or getPlayerVocation(cid) == 233 or getPlayerVocation(cid) == 237 or getPlayerVocation(cid) == 241 or getPlayerVocation(cid) == 245
or getPlayerVocation(cid) == 249 or getPlayerVocation(cid) == 253 or getPlayerVocation(cid) == 257 or getPlayerVocation(cid) == 261 or getPlayerVocation(cid) == 265 or getPlayerVocation(cid) == 269
or getPlayerVocation(cid) == 273 or getPlayerVocation(cid) == 303 or getPlayerVocation(cid) == 317 or getPlayerVocation(cid) == 318 or getPlayerVocation(cid) == 319 or getPlayerVocation(cid) == 320 or getPlayerVocation(cid) == 321 or getPlayerVocation(cid) == 322 or getPlayerVocation(cid) == 323 or getPlayerVocation(cid) == 324 or getPlayerVocation(cid) == 325 or getPlayerVocation(cid) == 326 or getPlayerVocation(cid) == 327 or getPlayerVocation(cid) == 328 or getPlayerVocation(cid) == 329 or getPlayerVocation(cid) == 330 or getPlayerVocation(cid) == 331 or getPlayerVocation(cid) == 332 or getPlayerVocation(cid) == 333 or getPlayerVocation(cid) == 334 or getPlayerVocation(cid) == 335 or getPlayerVocation(cid) == 336 or getPlayerVocation(cid) == 337 or getPlayerVocation(cid) == 338)
and exhaustion.get(cid, config.storage) == false then
if (getCreatureStorage(cid, 50036)==1) then
if getPlayerStorageValue(cid,50002) == 1 then
doSendMagicEffect(getPlayerPosition(cid),122)
elseif getPlayerStorageValue(cid,50003) == 1 then
doSendMagicEffect(getPlayerPosition(cid),131)
elseif getPlayerStorageValue(cid,50004) == 1 then
doSendMagicEffect(getPlayerPosition(cid),168)
elseif getPlayerStorageValue(cid,50005) == 1 then
doSendMagicEffect(getPlayerPosition(cid),169)
elseif getPlayerStorageValue(cid,50006) == 1 then
doSendMagicEffect(getPlayerPosition(cid),116)
elseif getPlayerStorageValue(cid,50007) == 1 then
doSendMagicEffect(getPlayerPosition(cid),130)
elseif getPlayerStorageValue(cid,50008) == 1 then
doSendMagicEffect(getPlayerPosition(cid),300)
elseif getPlayerStorageValue(cid,50009) == 1 then
doSendMagicEffect(getPlayerPosition(cid),301)
elseif getPlayerStorageValue(cid,50009) == 1 then
doSendMagicEffect(getPlayerPosition(cid),303)
elseif getPlayerStorageValue(cid,50010) == 1 then
doSendMagicEffect(getPlayerPosition(cid),304)
elseif getPlayerStorageValue(cid,50011) == 1 then
doSendMagicEffect(getPlayerPosition(cid),309)
end
exhaustion.set(cid,config.storage,config.timee)
else
doSendMagicEffect(getPlayerPosition(cid),config.efekt3)
exhaustion.set(cid,config.storage,config.timee)
end
----------------------------------------------------------------------
end
return true
end
Post automatically merged:

Here is script from action
function onUse(cid, item, fromPosition, itemEx, toPosition)
local playerpos = getCreaturePosition(cid)
setPlayerStorageValue(cid, 50036, 1)

doRemoveItem(item.uid,1)
doSendMagicEffect(playerpos, 121)
doCreatureSay(cid, 'Extra effect!', TALKTYPE_ORANGE_1)

return true
end
 
Last edited:

Similar threads

Back
Top