Follow along with the video below to see how to install our site as a web app on your home screen.
Notka: This feature may not be available in some browsers.
Chcia?bym prosic o skrypt na drzwi Wysoko lvl +1000 pod tibie 8.5
I jesli ktos by mial czasu i umiejetnosci to o skypt kasyna pod tibie 8.5
--Example
if getPlayerLevel(cid) >= 10 then --checking level
doSummonCreature("Chicken", fromPosition.x + 1)
else
doPlayerSendCancel(cid, "Sorry, your level isnt enought to summon this monster.")
end
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_BLOCKARMOR, 1)
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatFormula(combat, COMBAT_FORMULA_SKILL, 0, 0, 1.0, 0)
local poison = createCombatObject()
setCombatParam(poison, COMBAT_PARAM_TYPE, COMBAT_EARTHDAMAGE)
local conditionPoison = createConditionObject(CONDITION_POISON)
setConditionParam(conditionPoison, CONDITION_PARAM_DELAYED, 1)
addDamageCondition(conditionPoison, 4, 2000, -20)
addDamageCondition(conditionPoison, 6, 2000, -10)
setCombatCondition(conditionPoison, conditionPoison)
local fire = createCombatObject()
setCombatParam(poison, COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE)
local conditionFire = createConditionObject(CONDITION_FIRE)
setConditionParam(conditionFire, CONDITION_PARAM_DELAYED, 1)
addDamageCondition(conditionFire, 4, 2000, -50)
addDamageCondition(conditionFire, 6, 2000, -35)
setCombatCondition(fire, conditionFire)
local energy = createCombatObject()
setCombatParam(poison, COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE)
local conditionEnergy = createConditionObject(CONDITION_ENERGY)
setConditionParam(conditionEnergy, CONDITION_PARAM_DELAYED, 1)
addDamageCondition(conditionEnergy, 4, 2000, -30)
addDamageCondition(conditionEnergy, 6, 2000, -20)
setCombatCondition(energy, conditionEnergy)
function onUseWeapon(cid, var)
local szansa = math.random(100)
local chanceToHit = {40,30,10} --szansa terafienia dla: energia, ogie?, poison
local combats = {"energy","fire","poison"}
doCombat(cid,combat,var)
for i, v in pairs(combats) do
if(szansa > chanceToHit) then
doCombat(cid,v)
break
end
end
return TRUE
end
local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)
npcHandler:setMessage(MESSAGE_GREET, "[COLOR="Blue"]Tekst powitalny[/COLOR].")

-- function timeString by Colandus --
function timeString(timeDiff)
local dateFormat = {
{"day", timeDiff / 60 / 60 / 24},
{"hour", timeDiff / 60 / 60 % 24},
{"minute", timeDiff / 60 % 60},
{"second", timeDiff % 60}
}
local out = {}
for k, t in ipairs(dateFormat) do
local v = math.floor(t[2])
if(v > 0) then
table.insert(out, (k < #dateFormat and (#out > 0 and ', ' or '') or ' and ') .. v .. ' ' .. t[1] .. (v ~= 1 and 's' or ''))
end
end
return table.concat(out)
end
function onSay(cid, words, param, channel)
local pobieranieCzasu = --- tylko tego nie mam
return not (getCreatureCondition(cid, CONDITION_INFIGHT)) and doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You don't have pz lock.") or doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You have "..timeString(pobieranieCzasu).." pz time left.")
end
function onSay(cid, words, param, channel)
local itemek = 2160
if(param == '') then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command param required.")
return true
end
local account, tmp = getAccountIdByName(param), true
if(account == 0) then
account = getAccountIdByAccount(param)
if(account == 0) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Player or account '" .. param .. "' does not exists.")
return true
end
tmp = false
end
local ban = getBanData(account, BAN_ACCOUNT)
if(ban and doRemoveAccountBanishment(account)) then
local name = param
if(tmp) then
name = account
end
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, name .. " has been " .. (ban.expires == -1 and "undeleted" or "unbanned") .. ".")
doPlayerRemoveItem(cid, itemek, 1)
end
if(not tmp) then
return true
end
tmp = getIpByName(param)
if(isIpBanished(tmp) and doRemoveIpBanishment(tmp)) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "IP Banishment on " .. doConvertIntegerToIp(ip) .. " has been lifted.")
doPlayerRemoveItem(cid, itemek, 1)
end
local guid = getPlayerGUIDByName(param, true)
if(guid == nil) then
return true
end
ban = getBanData(guid, BAN_PLAYER, PLAYERBAN_LOCK)
if(ban and doRemovePlayerBanishment(guid, PLAYERBAN_LOCK)) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Namelock from " .. param .. " has been removed.")
doPlayerRemoveItem(cid, itemek, 1)
end
ban = getBanData(guid, BAN_PLAYER, PLAYERBAN_BANISHMENT)
if(ban and doRemovePlayerBanishment(guid, PLAYERBAN_BANISHMENT)) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, param .. " has been " .. (ban.expires == -1 and "undeleted" or "unbanned") .. ".")
doPlayerRemoveItem(cid, itemek, 1)
end
return true
end
-- by Renusek XD
function onSay(cid, words, param, channel)
local pierwszy = {
naruto = { lookType = 343, lookHead = 1, lookBody = 1, lookLegs = 1, lookFeet = 1, lookAddons = 0 },
sasuke = { lookType = 345, lookHead = 1, lookBody = 1, lookLegs = 1, lookFeet = 1, lookAddons = 0 },
sakura = { lookType = 347, lookHead = 1, lookBody = 1, lookLegs = 1, lookFeet = 1, lookAddons = 0 },
rocklee = { lookType = 349, lookHead = 1, lookBody = 1, lookLegs = 1, lookFeet = 1, lookAddons = 0 },
neji = { lookType = 351, lookHead = 1, lookBody = 1, lookLegs = 1, lookFeet = 1, lookAddons = 0 },
gaara = { lookType = 354, lookHead = 1, lookBody = 1, lookLegs = 1, lookFeet = 1, lookAddons = 0 },
kankurou = { lookType = 356, lookHead = 1, lookBody = 1, lookLegs = 1, lookFeet = 1, lookAddons = 0 },
kiba = { lookType = 353, lookHead = 1, lookBody = 1, lookLegs = 1, lookFeet = 1, lookAddons = 0 }
}
local drugi = {
narut = { lookType = 344, lookHead = 1, lookBody = 1, lookLegs = 1, lookFeet = 1, lookAddons = 0 },
sasek = { lookType = 346, lookHead = 1, lookBody = 1, lookLegs = 1, lookFeet = 1, lookAddons = 0 },
sakurka = { lookType = 348, lookHead = 1, lookBody = 1, lookLegs = 1, lookFeet = 1, lookAddons = 0 },
lee = { lookType = 350, lookHead = 1, lookBody = 1, lookLegs = 1, lookFeet = 1, lookAddons = 0 },
nedzi = { lookType = 352, lookHead = 1, lookBody = 1, lookLegs = 1, lookFeet = 1, lookAddons = 0 },
gara = { lookType = 355, lookHead = 1, lookBody = 1, lookLegs = 1, lookFeet = 1, lookAddons = 0 },
kank = { lookType = 334, lookHead = 1, lookBody = 1, lookLegs = 1, lookFeet = 1, lookAddons = 0 },
kibaa = { lookType = 332, lookHead = 1, lookBody = 1, lookLegs = 1, lookFeet = 1, lookAddons = 0 }
}
local config = {
pierwszymana = 6, -- ile many ma brac pierwszy trans
drugimana = 20, -- ile ma brac drugi trans
pierwszycoile = 1, -- co ile sekund ma brac mane w pierwszym transie
drugicoile = 2, -- co ile sekund ma brac mnane w drugim transie
pierwszylvl = 10, -- wymagany poziom na 1 trans
drugilvl = 30 -- wymaganay poziom na 2 trans
}
------v-NIE-RUSZAC-v---------------------
local maxMana = getPlayerMaxMana(cid)
local mana = getPlayerMana(cid)
local szybkosc = getCreatureSpeed(cid)
local poziom = getPlayerLevel(cid)
local profka = getPlayerVocation(cid)
local trans = getPlayerStorageValue(cid, TRANSFORMATION_STORAGE)
------^-NIE-RUSZAC-^---------------------
function pierwszyTrans(cid)
if trans == 0 then
if(poziom >= config.pierwszylvl) then
if(mana >= (maxMana / 3)) then
doCreatureAddMana(cid, -config.pierwszymana)
addEvent(pierwszyTrans, (config.pierwszycoile * 1000), cid)
stopEvent(drugiTrans)
stopEvent(drugiChakra)
else
stopEvent(pierwszyTrans)
addEvent(setPlayerStorageValue, 1, cid, TRANSFORMATION_STORAGE, 0)
end
end
end
return TRUE
end
--
function drugiTrans(cid)
if trans == 1 then
if(poziom >= config.drugilvl) then
if(mana >= (maxMana / 2)) then
doPlayerAddMana(cid, -config.drugimana)
addEvent(drugiTrans, (config.drugicoile * 1000), cid)
stopEvent(pierwszyTrans)
stopEvent(pierwszyChakra)
else
stopEvent(drugiTrans)
addEvent(setPlayerStorageValue, 1, cid, TRANSFORMATION_STORAGE, 1)
end
end
end
return TRUE
end
--
function wirujacaChakra(cid)
doSendMagicEffect(getCreaturePosition(cid), CONST_ME_CHAKRA)
addEvent(wirujacaChakra, (config.pierwszycoile * 1000), cid)
return TRUE
end
--
function wirujacaChakraDwa(cid)
doSendMagicEffect(getCreaturePosition(cid), CONST_ME_CHAKRA)
addEvent(wirujacaChakra, (config.drugicoile * 1000), cid)
return TRUE
end
--
function pierwszyChakra(cid)
if trans == 0 then
if(poziom >= config.pierwszylvl) then
if(mana >= (maxMana / 3)) then
doPlayerAddMana(cid, -config.pierwszymana)
addEvent(pierwszyChakra, (config.pierwszycoile * 1000), cid)
stopEvent(drugiTrans)
stopEvent(drugiChakra)
else
stopEvent(pierwszyChakra)
addEvent(setPlayerStorageValue, 1, cid, TRANSFORMATION_STORAGE, 0)
end
end
else
doPlayerSendCancel(cid, "Cos jest zle...")
end
return TRUE
end
--
function drugiChakra(cid)
if trans == 1 then
if(poziom >= config.drugilvl) then
if(mana >= (maxMana / 2)) then
doPlayerAddMana(cid, -config.drugimana)
addEvent(drugiChakra, (config.drugicoile * 1000), cid)
stopEvent(pierwszyChakra)
stopEvent(pierwszyTrans)
else
stopEvent(drugiChakra)
addEvent(setPlayerStorageValue, 1, cid, TRANSFORMATION_STORAGE, 1)
end
end
else
doPlayerSendCancel(cid, "Cos jest zle...")
end
return TRUE
end
--
if profka == 1 then
doSetCreatureOutfit(cid, pierwszy.naruto, -1)
addEvent(pierwszyTrans, 1, cid)
doPlayerSetVocation(cid, 2)
doChangeSpeed(cid, (szybkosc + 20))
addEvent(setPlayerStorageValue, 1, cid, TRANSFORMATION_STORAGE, 1)
elseif profka == 2 then
doSetCreatureOutfit(cid, drugi.narut, -1)
addEvent(drugiTrans, 1, cid)
doPlayerSetVocation(cid, 3)
addEvent(setPlayerStorageValue, 1, cid, TRANSFORMATION_STORAGE, 2)
elseif profka == 6 then
doSetCreatureOutfit(cid, pierwszy.sasuke, -1)
addEvent(pierwszyTrans, 1, cid)
doPlayerSetVocation(cid, 7)
doChangeSpeed(cid, (szybkosc + 20))
addEvent(setPlayerStorageValue, 1, cid, TRANSFORMATION_STORAGE, 1)
elseif profka == 7 then
doSetCreatureOutfit(cid, drugi.sasek, -1)
addEvent(drugiTrans, 1, cid)
doPlayerSetVocation(cid, 8)
addEvent(setPlayerStorageValue, 1, cid, TRANSFORMATION_STORAGE, 2)
elseif profka == 11 then
doSetCreatureOutfit(cid, pierwszy.sakura, -1)
addEvent(pierwszyChakra, 1, cid)
doPlayerSetVocation(cid, 12)
doChangeSpeed(cid, (szybkosc + 20))
addEvent(setPlayerStorageValue, 1, cid, TRANSFORMATION_STORAGE, 1)
addEvent(wirujacaChakra, (config.pierwszycoile * 1000), cid)
elseif profka == 12 then
doSetCreatureOutfit(cid, drugi.sakurka, -1)
addEvent(drugiTrans, 1, cid)
doPlayerSetVocation(cid, 13)
addEvent(setPlayerStorageValue, 1, cid, TRANSFORMATION_STORAGE, 2)
elseif profka == 16 then
doSetCreatureOutfit(cid, pierwszy.rocklee, -1)
addEvent(pierwszyChakra, 1, cid)
doPlayerSetVocation(cid, 17)
doChangeSpeed(cid, (szybkosc + 20))
addEvent(setPlayerStorageValue, 1, cid, TRANSFORMATION_STORAGE, 1)
addEvent(wirujacaChakra, (config.pierwszycoile * 1000), cid)
elseif profka == 17 then
doSetCreatureOutfit(cid, drugi.lee, -1)
addEvent(drugiTrans, 1, cid)
doPlayerSetVocation(cid, 18)
addEvent(setPlayerStorageValue, 1, cid, TRANSFORMATION_STORAGE, 2)
elseif profka == 21 then
doSetCreatureOutfit(cid, pierwszy.neji, -1)
addEvent(pierwszyTrans, 1, cid)
doPlayerSetVocation(cid, 22)
doChangeSpeed(cid, (szybkosc + 20))
addEvent(setPlayerStorageValue, 1, cid, TRANSFORMATION_STORAGE, 1)
elseif profka == 22 then
doSetCreatureOutfit(cid, drugi.nedzi, -1)
addEvent(drugiChakra, 1, cid)
doPlayerSetVocation(cid, 23)
addEvent(setPlayerStorageValue, 1, cid, TRANSFORMATION_STORAGE, 2)
addEvent(wirujacaChakradwa, (config.pierwszycoile * 1000), cid)
elseif profka == 26 then
doSetCreatureOutfit(cid, pierwszy.kiba, -1)
addEvent(pierwszyTrans, 1, cid)
doPlayerSetVocation(cid, 27)
doChangeSpeed(cid, (szybkosc + 20))
addEvent(setPlayerStorageValue, 1, cid, TRANSFORMATION_STORAGE, 1)
elseif profka == 27 then
doSetCreatureOutfit(cid, drugi.kibaa, -1)
addEvent(drugiChakra, 1, cid)
doPlayerSetVocation(cid, 28)
addEvent(setPlayerStorageValue, 1, cid, TRANSFORMATION_STORAGE, 2)
addEvent(wirujacaChakradwa, (config.pierwszycoile * 1000), cid)
elseif profka == 31 then
doSetCreatureOutfit(cid, pierwszy.gaara, -1)
addEvent(pierwszyTrans, 1, cid)
doPlayerSetVocation(cid, 32)
doChangeSpeed(cid, (szybkosc + 20))
addEvent(setPlayerStorageValue, 1, cid, TRANSFORMATION_STORAGE, 1)
elseif profka == 32 then
doSetCreatureOutfit(cid, drugi.gara, -1)
addEvent(drugiTrans, 1, cid)
doPlayerSetVocation(cid, 33)
addEvent(setPlayerStorageValue, 1, cid, TRANSFORMATION_STORAGE, 2)
elseif profka == 36 then
doSetCreatureOutfit(cid, pierwszy.kankurou, -1)
addEvent(pierwszyTrans, 1, cid)
doPlayerSetVocation(cid, 37)
doChangeSpeed(cid, (szybkosc + 20))
addEvent(setPlayerStorageValue, 1, cid, TRANSFORMATION_STORAGE, 1)
elseif profka == 37 then
doSetCreatureOutfit(cid, drugi.kank, -1)
addEvent(drugiChakra, 1, cid)
doPlayerSetVocation(cid, 38)
addEvent(setPlayerStorageValue, 1, cid, TRANSFORMATION_STORAGE, 2)
addEvent(wirujacaChakradwa, (config.pierwszycoile * 1000), cid)
end
return TRUE
end
Tutaj nie zamawia sie skryptow. My tylko pomagamy Wam je pisac. Jednakze, ze mam troche czasu, napisalem go dla Ciebie:Witam chcia?bym zrobi? npc kt?ry na teleportuje w miejsce Y i Z ale ?eby by?o 25% szans na to by teleportowa? nas w miejsce X.
function onStepIn(cid, item, position, lastPosition, fromPosition, toPosition, actor)
local losuj = math.random(1,4)
local pozycja = {x=1000, y=1000, z=7}
if losuj = 4 then
doTeleportThing(cid, pozycja)
else
doTeleportThing(cid, fromPosition)
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Teraz nie mozesz sie teleportowac.")
end
return true
end
function onStepIn(cid, item, position, fromPosition)
local losuj = math.random(1,4)
local pozycja = {x=1000, y=1000, z=7}
if (losuj == 4) then
doTeleportThing(cid, pozycja)
else
doTeleportThing(cid, fromPosition)
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Teraz nie mozesz sie teleportowac.")
end
return true
end
W twoim tez, zla funkcja:W ostatnim skrypcie Ldrozd'a jest b??d, to powinno tak wygl?da?:
Kod:function onStepIn(cid, item, position, fromPosition) local losuj = math.random(1,4) local pozycja = {x=1000, y=1000, z=7} if (losuj == 4) then doTeleportThing(cid, pozycja) else doTeleportThing(cid, fromPosition) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Teraz nie mozesz sie teleportowac.") end return true end
function onStepIn(cid, item, position, lastPosition, fromPosition, toPosition, actor)
local losuj = math.random(1,4)
local pozycja = {x=1000, y=1000, z=7}
if losuj == 4 then
doTeleportThing(cid, pozycja)
else
doTeleportThing(cid, fromPosition)
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Teraz nie mozesz sie teleportowac.")
end
return true
end
Cos takiego mniej wiecej:Ciekaw jestem , Czy jest kto? mi wstanie pom?c:
1)Jest jaka? funkcja wysy?aj?ca Msg do 'getCreaturePosition(cid)' + 1 (Chodzi o po?o?enie gracza , x +1)
local pos = {x = position.x-1, y = position.y, z = position.z}
local graczaPos = getThingFromPos(pos).uid
local text = "Blablabla"
doSendAnimatedText(graczaPos, text, COLOR_PINK)
function onStepIn(cid, item, position, fromPosition)
if(item.actionid > 30020 and item.actionid < 30100) then
local townId = (item.actionid - 30020)
doPlayerSetTown(cid, townId)
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You are the newest resident of " .. getTownName(townId) .. ".")
end
return true
end