felipefioravanti
-
Total de itens
16 -
Registro em
-
Última visita
Posts postados por felipefioravanti
-
-
versão 8.6
servidor styller yourots
experiencia básico
Bom, esses dias axei um script bem legalzinho aki
--<< Configurable >>-- local storages = { speed = 314622, status = 352993 } -- Empty storages local cfg = { min_speed = 300, -- better not increase than that [ the least speed for a car ] max_speed = 200, -- better not decrease than this [ the maximum speed for a car ] Increase_per_command = 100, -- The speed increase or decrease value per each command (!car speed // !car slow) Car_Explode = true -- Keep it true , so your map isnt filled with cars } -->> END <<-- --<< Functions >>-- function isWalkable(pos, creature, pz)-- Modificações by Hudsin,Arkires e Pinpao Xtibia if getTileThingByPos({x = pos.x, y = pos.y, z = pos.z, stackpos = 0}).itemid == 0 then return false end if getTopCreature(pos).uid > 0 and creature then return false end if getTileInfo(pos).protection and pz then return false, true end local n = not proj and 3 or 2 for i = 0, 255 do pos.stackpos = i local tile = getTileThingByPos(pos) if tile.itemid ~= 0 and not isCreature(tile.uid) then if hasProperty(tile.uid, n) or hasProperty(tile.uid, 7) then return false end end end return true end function getCarSpeed(cid) return getPlayerStorageValue(cid,storages.speed) end function setCarSpeed(cid,value) return setPlayerStorageValue(cid,storages.speed, getPlayerStorageValue(cid,storages.speed) + value) end function setCarStatus(cid,value) return setPlayerStorageValue(cid,storages.status,value) end function carMove(cid) return getPlayerStorageValue(cid,storages.status) > 0 and true or false end function move(cid,time) local dir = getCreatureLookDir(cid) local id = isInArray({1,3},getCreatureLookDir(cid)) and 7267 or 7266 local place = getPositionByDirection(getThingPos(cid),dir,1) if isWalkable(place,true,true,true) then doRemoveItem( getTileItemById(getThingPos(cid),7267).uid > 0 and getTileItemById(getThingPos(cid),7267).uid or getTileItemById(getThingPos(cid),7266).uid ) doTeleportThing(cid,place,false) addEvent(doSendMagicEffect,time+10,place,34) doCreateItem(id,1,place) if carMove(cid) then addEvent(move,time,cid,getCarSpeed(cid)) else doRemoveItem( getTileItemById(getThingPos(cid),7267).uid > 0 and getTileItemById(getThingPos(cid),7267).uid or getTileItemById(getThingPos(cid),7266).uid ) end else doCreatureSetNoMove(cid, 0) doPlayerSendTextMessage(cid,27,"You have hit somthng.") setCarStatus(cid,0) if cfg.Car_Explode then doRemoveItem( getTileItemById(getThingPos(cid),7267).uid > 1 and getTileItemById(getThingPos(cid),7267).uid or getTileItemById(getThingPos(cid),7266).uid ) doSendAnimatedText(getThingPos(cid),"Crashed",TEXTCOLOR_RED) doSendMagicEffect(getThingPos(cid),31) end end end --<< Functions Ends <<-- function onSay(cid, words, param, channel) if param == "speed" then if carMove(cid) then if getCarSpeed(cid) > cfg.max_speed then setCarSpeed(cid,-(cfg.Increase_per_command)) addEvent(doSendAnimatedText,10,getThingPos(cid),"Speeding",TEXTCOLOR_GREEN) else setCarSpeed(cid,cfg.max_speed) doPlayerSendCancel(cid,"The car is in its maximum speed.") end else doPlayerSendCancel(cid,"You should start moving first.") end elseif param == "slow" then if carMove(cid) then if getCarSpeed(cid) < cfg.min_speed then setCarSpeed(cid,cfg.Increase_per_command) addEvent(doSendAnimatedText,10,getThingPos(cid),"Slowing",TEXTCOLOR_GREEN) else setCarSpeed(cid,cfg.min_speed) doPlayerSendCancel(cid,"The car is in its minumium speed.") end else doPlayerSendCancel(cid,"You should start moving first.") end elseif param == "stop" then -- by DarkVelocity Xtibia if carMove(cid) then setCarStatus(cid,0) doCreatureSetNoMove(cid, 0) else doPlayerSendCancel(cid,"Car is already stopped.") end elseif param == "move" then if not carMove(cid) then if getTileItemById(getThingPos(cid),7267).uid < 1 and getTileItemById(getThingPos(cid),7266).uid < 1 then local item = isInArray({1,3},getCreatureLookDir(cid)) and 7267 or 7266 doCreateItem(item,1,getThingPos(cid)) end setPlayerStorageValue(cid,storages.speed,cfg.min_speed) setCarStatus(cid,1) doCreatureSetNoMove(cid, 1) move(cid,getCarSpeed(cid)) else doPlayerSendCancel(cid,"Car is already moving.") end end return true end
queria fazer algo que só desse pra usar ele em tal area, tem como ? por exemplo, se eu tentar usar outra area a nao ser a que eu quero, aparece que não pode
e que por exemplo, se vc batesse o carro na parede, vc seria teletransportado para o templo
agradeço desde já
-
Não estou apoiando reviver o tópico mas.
ve se tem <talkaction access="5" ou algo do tipo no resto das talk.
se tiver em totas é so vcs colocar isso antes da talk do fly systen .
o 5 é o id do god (coloke o id do player)
espero ter ajudado
nem tem, vc pode me ajudar por msn ? pra evitar spam aqui
felipefioravanti@live.com
valeu
-
Lol esta correto, como voce fez dar esse erro?
oO
ué cara fiz o que vc pediu
data -> lib -> ReflectLib.lua
function isHandedWeapon(itemuid) local typee = getItemWeaponType(itemuid) or 0 if typee >= 1 and typee <= 6 then return CONST_SLOT_RIGHT end return -1 end function getItemType(itemid) local slottypes = {"head", "body", "legs", "feet", "ring", "necklace"} local consts = { ["head"] = CONST_SLOT_HEAD, ["armor"] = CONST_SLOT_ARMOR, ["legs"] = CONST_SLOT_LEGS, ["feet"] = CONST_SLOT_FEET, ["ring"] = CONST_SLOT_RING, ["necklace"] = CONST_SLOT_NECKLACE } local arq = io.open("data/items/items.xml", "r"):read("*all") local attributes = arq:match('<item id="' .. itemid .. '".+name="' .. getItemNameById(itemid) ..'">(.-)</item>') local slot = "" for i,x in pairs(slottypes) do if attributes:find(x) then slot = x break end end if slot == "body" then slot = "armor" end return consts[slot] end function addReflectCharges(item, charges, reflectpercent) if charges ~= "inf" then charges = charges+1 doItemSetAttribute(item, "mcharges", charges) doItemSetAttribute(item, "charges", charges) doItemSetAttribute(item, "name", getItemNameById(getThing(item).itemid) .. " that is brand-new") else doItemSetAttribute(item, "charges", -1) doItemSetAttribute(item, "mcharges", "inf") end doItemSetAttribute(item, "reflect", reflectpercent) doItemSetAttribute(item, "description", "That item reflects " .. reflectpercent .. " percent of physical damage.") end function renewCharges(item) if getItemAttribute(item, "charges") and getItemAttribute(item, "mcharges") ~= "inf" then doItemSetAttribute(item, "charges", getItemAttribute(item, "mcharges")) doItemSetAttribute(item, "name", getItemNameById(getThing(item).itemid) .. " that is brand-new") end end
data -> creaturescripts -> scripts -> reflectDamage.lua
function onStatsChange(cid, attacker, type, combat, value) local slots = {CONST_SLOT_HEAD, CONST_SLOT_NECKLACE, CONST_SLOT_ARMOR, CONST_SLOT_RIGHT, CONST_SLOT_LEFT, CONST_SLOT_LEGS, CONST_SLOT_FEET, CONST_SLOT_RING} local reflectpercent = 0 local itens = {} for i = 1, #slots do if getPlayerSlotItem(cid, slots[i]).uid > 1 and (getItemType(getPlayerSlotItem(cid, slots[i]).itemid) == slots[i] or isInArray({CONST_SLOT_RIGHT, CONST_SLOT_LEFT}, isHandedWeapon(getPlayerSlotItem(cid, slots[i]).uid))) and getItemAttribute(getPlayerSlotItem(cid, slots[i]).uid, "mcharges") and (getItemAttribute(getPlayerSlotItem(cid, slots[i]).uid, "charges") > 1 or getItemAttribute(getPlayerSlotItem(cid, slots[i]).uid, "mcharges") == "inf") then reflectpercent = reflectpercent+getItemAttribute(getPlayerSlotItem(cid, slots[i]).uid, "reflect") table.insert(itens, getPlayerSlotItem(cid, slots[i])) end end if combat == 1 and reflectpercent > 0 then if math.ceil(-value*((100-reflectpercent)/100)) < 0 then doCreatureAddHealth(cid, math.ceil(-value*((100-reflectpercent)/100))) doSendAnimatedText(getCreaturePosition(cid), math.ceil(value*((100-reflectpercent)/100)), COLOR_RED) local a = doCreateItem(2019, 2, getCreaturePosition(cid)) doSendMagicEffect(getCreaturePosition(cid), 0) doDecayItem(a) else doSendMagicEffect(getCreaturePosition(cid), 3) end if math.ceil(-value*(reflectpercent/100)) < 0 then doCreatureAddHealth(attacker, math.ceil(-value*(reflectpercent/100))) doSendAnimatedText(getCreaturePosition(attacker), math.ceil(value*(reflectpercent/100)), COLOR_GREY) local a = doCreateItem(2019, 2, getCreaturePosition(attacker)) doSendMagicEffect(getCreaturePosition(attacker), 9) doDecayItem(a) end for i,x in pairs(itens) do if getItemAttribute(x.uid, "mcharges") ~= "inf" then doItemSetAttribute(x.uid, "charges", getItemAttribute(x.uid, "charges")-1) doItemSetAttribute(x.uid, "name", getItemNameById(x.itemid) .. " that has " .. getItemAttribute(x.uid, "charges")-1 .. " charge" .. (getItemAttribute(x.uid, "charges")-1 > 1 and "s" or "") .. " left") end end else return TRUE end end
data -> creaturescripts -> scripts -> login.lua
local config = { loginMessage = getConfigValue('loginMessage') } function onLogin(cid) local loss = getConfigValue('deathLostPercent') if(loss ~= nil) then doPlayerSetLossPercent(cid, PLAYERLOSS_EXPERIENCE, loss * 10) end local accountManager = getPlayerAccountManager(cid) if(accountManager == MANAGER_NONE) then local lastLogin, str = getPlayerLastLoginSaved(cid), config.loginMessage if(lastLogin > 0) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, str) str = "Your last visit was on " .. os.date("%a %b %d %X %Y", lastLogin) .. "." else str = str .. " Please choose your outfit." doPlayerSendOutfitWindow(cid) end doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, str) elseif(accountManager == MANAGER_NAMELOCK) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, it appears that your character has been namelocked, what would you like as your new name?") elseif(accountManager == MANAGER_ACCOUNT) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, type 'account' to manage your account and if you want to start over then type 'cancel'.") else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, type 'account' to create an account or type 'recover' to recover an account.") end if(not isPlayerGhost(cid)) then doSendMagicEffect(getCreaturePosition(cid), CONST_ME_TELEPORT) end registerCreatureEvent(cid, "Mail") registerCreatureEvent(cid, "GuildMotd") registerCreatureEvent(cid, "killer") registerCreatureEvent(cid, "Idle") registerCreatureEvent(cid, "attackguild") registerCreatureEvent(cid, "advance") registerCreatureEvent(cid, "FimVip") registerCreatureEvent(cid, "SkullCheck") registerCreatureEvent(cid, "ReportBug") registerCreatureEvent(cid, VipReceive) registerCreatureEvent(cid, "PlayerKill") if (InitArenaScript ~= 0) then InitArenaScript = 1 -- make arena rooms free for i = 42300, 42309 do setGlobalStorageValue(i, 0) setGlobalStorageValue(i+100, 0) end end -- if he did not make full arena 1 he must start from zero if getPlayerStorageValue(cid, 42309) < 1 then for i = 42300, 42309 do setPlayerStorageValue(cid, i, 0) end end -- if he did not make full arena 2 he must start from zero if getPlayerStorageValue(cid, 42319) < 1 then for i = 42310, 42319 do setPlayerStorageValue(cid, i, 0) end end -- if he did not make full arena 3 he must start from zero if getPlayerStorageValue(cid, 42329) < 1 then for i = 42320, 42329 do setPlayerStorageValue(cid, i, 0) end end if getPlayerStorageValue(cid, 42355) == -1 then setPlayerStorageValue(cid, 42355, 0) -- did not arena level end setPlayerStorageValue(cid, 42350, 0) -- time to kick 0 setPlayerStorageValue(cid, 42352, 0) -- is not in arena fly.login(cid) registerCreatureEvent(cid, "onPrepareDeath") registerCreatureEvent(cid, "task_count") registerCreatureEvent(cid, "onPrepareDeathinifi") registerCreatureEvent(cid, "ReflectDamage") return true end
creaturescripts.xml ->
<?xml version="1.0" encoding="UTF-8"?> <creaturescripts> <event type="login" name="PlayerLogin" event="script" value="login.lua"/> <event type="joinchannel" name="GuildMotd" event="script" value="guildmotd.lua"/> <event type="receivemail" name="Mail" event="script" value="mail.lua"/> <event type="reportbug" name="SaveReportBug" script="reportbug.lua"/> <event type="think" name="Idle" event="script" value="idle.lua"/> <event type="think" name="SkullCheck" event="script" value="skullcheck.lua"/> <event type="death" name="PlayerDeath" event="script" value="playerdeath.lua"/> <event type="login" name="FirstItems" event="script" value="firstitems.lua"/> <event type="PrepareDeath" name="pvparena" script="pvparena.lua"/> <event type="attack" name="attackguild" script="attackguild.lua"/> <event type="logout" name="Playerlogout" event="script" value="logout.lua"/> <event type="logout" name="FimVip" event="script" value="vipname.lua"/> <event type="statschange" name="ReflectSpellKnight" event="script" value="spells/reflectknight.lua"/> <event type="statschange" name="ReflectSpellPally" event="script" value="spells/reflectpally.lua"/> <event type="statschange" name="ReflectSpellMage" event="script" value="spells/reflectmage.lua"/> <event type="kill" name="task_count" script="taskcount.lua"/> <event type="preparedeath" name="onPrepareDeathinifi" event="script" value="aolinfinity.lua"/> <event type="statschange" name="ReflectDamage" event="script" value="reflectDamage.lua"/> </creaturescripts>
agora nem tá dando mais o erro, só que tambem nao tá refletindo
olha se ajudar minhas vocações são novas
veja ai
--> vocations.xml
<?xml version="1.0" encoding="UTF-8"?> <vocations> <vocation id="0" name="None" description="none" needpremium="0" gaincap="5" gainhp="5" gainmana="5" gainhpticks="6" gainhpamount="1" gainmanaticks="6" gainmanaamount="1" manamultiplier="4.0" attackspeed="2000" soulmax="100" gainsoulticks="120" fromvoc="0" attackable="no"> <formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/> <skill fist="1.5" club="2.0" sword="2.0" axe="2.0" distance="2.0" shielding="1.5" fishing="1.1" experience="1.0"/> </vocation> <vocation id="1" name="Wizard" description="a Wizard" needpremium="0" gaincap="10" gainhp="5" gainmana="30" gainhpticks="6" gainhpamount="50" gainmanaticks="3" gainmanaamount="70" manamultiplier="1.1" attackspeed="500" soulmax="100" gainsoulticks="120" fromvoc="1"> <formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/> <skill fist="1.5" club="2.0" sword="2.0" axe="2.0" distance="2.0" shielding="1.5" fishing="1.1" experience="1.0"/> </vocation> <vocation id="2" name="Priest" description="a Priest" needpremium="0" gaincap="10" gainhp="5" gainmana="30" gainhpticks="6" gainhpamount="50" gainmanaticks="3" gainmanaamount="70" manamultiplier="1.1" attackspeed="500" soulmax="100" gainsoulticks="120" fromvoc="2"> <formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/> <skill fist="1.5" club="1.8" sword="1.8" axe="1.8" distance="1.8" shielding="1.5" fishing="1.1" experience="1.0"/> </vocation> <vocation id="3" name="Archer" description="a archer" needpremium="0" gaincap="20" gainhp="10" gainmana="15" gainhpticks="4" gainhpamount="65" gainmanaticks="4" gainmanaamount="60" manamultiplier="1.4" attackspeed="500" soulmax="100" gainsoulticks="120" fromvoc="3"> <formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/> <skill fist="1.2" club="1.2" sword="1.2" axe="1.2" distance="1.1" shielding="1.1" fishing="1.1" experience="1.0"/> </vocation> <vocation id="4" name="Guardian" description="a guardian" needpremium="0" gaincap="25" gainhp="15" gainmana="5" gainhpticks="3" gainhpamount="80" gainmanaticks="6" gainmanaamount="40" manamultiplier="3.0" attackspeed="500" soulmax="100" gainsoulticks="120" fromvoc="4"> <formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/> <skill fist="1.1" club="1.1" sword="1.1" axe="1.1" distance="1.4" shielding="1.1" fishing="1.1" experience="1.0"/> </vocation> <vocation id="13" name="Alchemist" description="a alchemist" needpremium="0" gaincap="25" gainhp="5" gainmana="30" gainhpticks="0" gainhpamount="60" gainmanaticks="6" gainmanaamount="65" manamultiplier="1.1" attackspeed="500" soulmax="200" gainsoulticks="120" fromvoc="13"> <formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/> <skill fist="1.1" club="1.1" sword="1.1" axe="1.1" distance="1.4" shielding="1.1" fishing="1.1" experience="1.0"/> </vocation> <vocation id="14" name="Creator" description="a creator" needpremium="0" gaincap="25" gainhp="5" gainmana="30" gainhpticks="0" gainhpamount="60" gainmanaticks="6" gainmanaamount="65" manamultiplier="1.1" attackspeed="500" soulmax="300" gainsoulticks="120" fromvoc="13"> <formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/> <skill fist="1.1" club="1.1" sword="1.1" axe="1.1" distance="1.4" shielding="1.1" fishing="1.1" experience="1.0"/> </vocation> <vocation id="5" name="Powerful Wizard" description="a Powerful Wizard" needpremium="1" gaincap="10" gainhp="5" gainmana="30" gainhpticks="4" gainhpamount="100" gainmanaticks="2" gainmanaamount="150" manamultiplier="1.1" attackspeed="500" soulmax="200" gainsoulticks="15" fromvoc="1" lessloss="30"> <formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/> <skill fist="1.5" club="2.0" sword="2.0" axe="2.0" distance="2.0" shielding="1.5" fishing="1.1" experience="1.0"/> </vocation> <vocation id="6" name="Divine" description="an divine" needpremium="1" gaincap="10" gainhp="5" gainmana="30" gainhpticks="4" gainhpamount="100" gainmanaticks="2" gainmanaamount="150" manamultiplier="1.1" attackspeed="500" soulmax="200" gainsoulticks="15" fromvoc="2" lessloss="30"> <formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/> <skill fist="1.5" club="1.8" sword="1.8" axe="1.8" distance="1.8" shielding="1.5" fishing="1.1" experience="1.0"/> </vocation> <vocation id="7" name="Sniper" description="a sniper" needpremium="1" gaincap="20" gainhp="10" gainmana="15" gainhpticks="3" gainhpamount="150" gainmanaticks="3" gainmanaamount="130" manamultiplier="1.4" attackspeed="500" soulmax="200" gainsoulticks="15" fromvoc="3" lessloss="30"> <formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/> <skill fist="1.2" club="1.2" sword="1.2" axe="1.2" distance="1.1" shielding="1.1" fishing="1.1" experience="1.0"/> </vocation> <vocation id="8" name="Horseman" description="an horseman" needpremium="1" gaincap="25" gainhp="15" gainmana="5" gainhpticks="2" gainhpamount="170" gainmanaticks="4" gainmanaamount="80" manamultiplier="3.0" attackspeed="500" soulmax="200" gainsoulticks="15" fromvoc="4" lessloss="30"> <formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/> <skill fist="1.1" club="1.1" sword="1.1" axe="1.1" distance="1.4" shielding="1.1" fishing="1.1" experience="1.0"/> </vocation> <!-- <vocation id="9" name="Dark Mage" description="an dark mage" needpremium="0" gaincap="10" gainhp="5" gainmana="30" gainhpticks="4" gainhpamount="10" gainmanaticks="2" gainmanaamount="10" manamultiplier="1.1" attackspeed="2000" soulmax="200" gainsoulticks="15" fromvoc="5" lessloss="50"> <formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/> <skill fist="1.5" club="2.0" sword="2.0" axe="2.0" distance="2.0" shielding="1.5" fishing="1.1" experience="1.0"/> </vocation> <vocation id="10" name="Cleric" description="an cleric" needpremium="0" gaincap="10" gainhp="5" gainmana="30" gainhpticks="4" gainhpamount="10" gainmanaticks="2" gainmanaamount="10" manamultiplier="1.1" attackspeed="2000" soulmax="200" gainsoulticks="15" fromvoc="6" lessloss="50"> <formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/> <skill fist="1.5" club="1.8" sword="1.8" axe="1.8" distance="1.8" shielding="1.5" fishing="1.1" experience="1.0"/> </vocation> <vocation id="11" name="Striker" description="an Striker" needpremium="0" gaincap="20" gainhp="10" gainmana="15" gainhpticks="3" gainhpamount="10" gainmanaticks="3" gainmanaamount="10" manamultiplier="1.4" attackspeed="2000" soulmax="200" gainsoulticks="15" fromvoc="7" lessloss="50"> <formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/> <skill fist="1.2" club="1.2" sword="1.2" axe="1.2" distance="1.1" shielding="1.1" fishing="1.1" experience="1.0"/> </vocation> <vocation id="12" name="Heavy Tanker" description="an heavy tanker" needpremium="0" gaincap="25" gainhp="15" gainmana="5" gainhpticks="8" gainhpamount="10" gainmanaticks="4" gainmanaamount="10" manamultiplier="3.0" attackspeed="2000" soulmax="200" gainsoulticks="15" fromvoc="8" lessloss="50"> <formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/> <skill fist="1.1" club="1.1" sword="1.1" axe="1.1" distance="1.4" shielding="1.1" fishing="1.1" experience="1.0"/> </vocation> --> </vocations>
abraço
-
ja dei, tem como deixar infinito ?
-
ah então posta isso no tutorial que tem muita gente que nao sabe fazer isso ( inclusive eu ).
olha aki:
<item id="2125" article="a" name="crystal necklace"> <attribute key="weight" value="490" /> <attribute key="slotType" value="necklace" /> </item>
o que eu edito aki pra funcionar ?
desde já agradeço
-
[18/08/2011 14:33:28] [Error - CreatureScript Interface] [18/08/2011 14:33:28] data/creaturescripts/scripts/reflectDamage.lua:onStatsChange [18/08/2011 14:33:28] Description: [18/08/2011 14:33:28] data/lib/reflectlib.lua:23: attempt to index local 'attributes' (a nil value) [18/08/2011 14:33:28] stack traceback: [18/08/2011 14:33:28] data/lib/reflectlib.lua:23: in function 'getItemType' [18/08/2011 14:33:28] data/creaturescripts/scripts/reflectDamage.lua:6: in function <data/creaturescripts/scripts/reflectDamage.lua:1>
-
talkactions nem pego
[17/08/2011 15:11:18] data/talkactions/scripts/forjas.lua:3: attempt to index global 'file' (a nil value) [17/08/2011 15:11:18] stack traceback: [17/08/2011 15:11:18] data/talkactions/scripts/forjas.lua:3: in function <data/talkactions/scripts/forjas.lua:1>
EDIT- deixa pra lá , eu que tinha feito errado
REP+,obrigado
-
tem como deixar o item infinito ?
vlw
-
então é pq o otserver n deixa summonar em pz, só editando as soucer mesmo
ah tá, valeu
-
Siguinte, hoje estava querendo adicionar novas vocações só que não sei como botar elas no account manager, já procurei em vários lugares mais não axei. Já adicionei elas no vocations.xml e no libs - 031-vocations.
se souber, por favor, não EXITE em responder
valendoREP+, obrigado.
\o
__________________________
Problema resolvido, consegui achar uma solução. Podem fechar o tópico, obrigado.
Pensando bem, não fechem ainda, tem um erro, quando vou logar no character que seria a nova vocação ele não loga >.>
esperando uma resposta flw
21:37 You see yourself. You are a alchemist.
finalmente
podem fechar, valeu a ajuda --'
-
só tira as linhas
if getTilePzInfo(getCreaturePosition(cid)) == false then else doPlayerSendCancel(cid, "Sorry, You cannot create Element Pet in pz.") end
ai vai poder summonar em pz
fiz isso amigo, mais quando vou fazer na prática, escrevo !criar e aparece 18:49 [sTAFF] Lipe: Go to me, dragon hatchling , só que o bixo não nasce o_o
bom, de qualquer forma muito obrigado por ajudar
-
LipeFioravanti , esse seu erro esta nos itens iniciais de quando o player faz o char, eles ficam na pasta data/creaturescripts/scripts/firstitems.lua, mais especificamente na linha 55 tem um mau argumento, me manda pm com o seu script que eu arrumo. e cade meu rep ? e.e
Desculpe, ontem de madrugada tive que sair, mais seu rep está aqui \o
Reputação dada
LipeFioravanti
EDIT -
firstitems.lua
local firstItems = {}
firstItems[0] =
{
2173,
2525,
2428,
2124,
2460,
2478,
2643
}
firstItems[1] =
{
2173,
2525,
2190,
2124,
2460,
2478,
2643
}
firstItems[2] =
{
2173,
2525,
2182,
2124,
2460,
2478,
2643
}
firstItems[3] =
{
2173,
2525,
2389,
2124,
2460,
2478,
2643
}
firstItems[4] =
{
2173,
2525,
2428,
2124,
2460,
2478,
2643
}
function onLogin(cid)
if getPlayerStorageValue(cid, 30001) == -1 then
for i = 1, table.maxn(firstItems[getPlayerVocation(cid)]) do
doPlayerAddItem(cid, firstItems[getPlayerVocation(cid)], 1)
end
if getPlayerSex(cid) == 0 then
doPlayerAddItem(cid, 2465, 1)
else
doPlayerAddItem(cid, 2465, 1)
end
local bag = doPlayerAddItem(cid, 9774, 1)
doAddContainerItem(bag, 2160, 1)
doAddContainerItem(bag, 2554, 1)
doAddContainerItem(bag, 2120, 1)
doAddContainerItem(bag, 7618, 1)
doAddContainerItem(bag, 2383, 1)
setPlayerStorageValue(cid, 30001, 1)
end
return TRUE
end
EDIT 2-
cara, tem como vc me explicar como eu faço pra sumonar o bixo no pz ? valeu
-
mano, o script tem lvl máximo, ou seja dps do lvl 30 não pode mais criar, no tópico tem como tirar essa parte
e o erro do seu executável n tem nada a ver com o meu systema
Ah tá, entendi
Já o erro, se alguém souber o que é, por favor me fale
EDIT -
Cara, consegui botar os pets aqui no ot
merece rep+
valeeeeeeeu /o\
-
Caramba, desculpa mesmo gente, eu acho que esse negocio de postar em topicos muito antigos é reviver topicos e blablabla... Mas eu estou com um problema aqui e n sei aonde postar entao se alguem puder me dar uma ajudinha: É que eu peguei esse sistema ai so que eu consigo usar ele somente no meu char GOD, nos chars normais eu n consigo usar, porque sera isso? e se alguem souber por favor poste um ai que nao tenha esse problema, ou entao me diga oque esta aconteçendo com o meu.... Obrigado desde ja,
~~
~~
Att. :XTibia_smile:
Desculpem reviver esse tópico, mas eu estou com o mesmo problema do colega aqui de cima...
Alguém sabe a solução ?
-
Cara, não funcionou aqui, fiz tudo que você pediu, mas quando eu boto
e entro no server, aparece isso:<flag convinceable="1"/>[10/08/2011 16:04:06] [Error - CreatureScript Interface][10/08/2011 16:04:06] data/creaturescripts/scripts/firstitems.lua:onLogin
[10/08/2011 16:04:06] Description:
[10/08/2011 16:04:06] data/creaturescripts/scripts/firstitems.lua:55: bad argument #1 to 'maxn' (table expected, got nil)
[10/08/2011 16:04:06] stack traceback:
[10/08/2011 16:04:06] [C]: in function 'maxn'
[10/08/2011 16:04:06] data/creaturescripts/scripts/firstitems.lua:55: in function <data/creaturescripts/scripts/firstitems.lua:53>
Infelizmente, eu tentei colocar o flag convinceable no 0 mais não funcionou, quando eu escrevia !criar apenas falava que eu não tinha level, mesmo eu sendo level 70k >.>
-
Bem gente... esse é o meu primeiro tópico aqui, sou bem novo no xtibia então se caso eu fazer algo de errado ou postar na area errada me alertem por favor
Bom vou ser bem rápido e claro
Eu mudei o nome das minhas vocations, tá até ai tudo bem, mas quando vou comprar promotion continua no nome da primeira vocation, e não da segunda
<npc name="Karlos" script="data/npc/scripts/itens.lua" access="5" lookdir="1"><health now="1000" max="1000"/>
<look type="160" head="0" body="86" legs="0" feet="38" addons="1"/>
<parameters>
<parameter key="message_greet" value="Ola |PLAYERNAME|. Eu Vendo os novos itens da versao 8.6, Deseja ver algum ? Diga [TRADE]."/>
<parameter key="message_decline" value="E |TOTALCOST| gold coins muito para você , me de linceça que eu tenho que vender mais!"/>
</parameters>
</npc>
------------------------------
<?xml version="1.0" encoding="UTF-8"?><vocations>
<vocation id="0" name="None" description="none" needpremium="0" gaincap="5" gainhp="5" gainmana="5" gainhpticks="6" gainhpamount="1" gainmanaticks="6" gainmanaamount="1" manamultiplier="4.0" attackspeed="2000" soulmax="100" gainsoulticks="120" fromvoc="0" attackable="no">
<formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/>
<skill fist="1.5" club="2.0" sword="2.0" axe="2.0" distance="2.0" shielding="1.5" fishing="1.1" experience="1.0"/>
</vocation>
<vocation id="1" name="Wizard" description="a Wizard" needpremium="0" gaincap="10" gainhp="5" gainmana="30" gainhpticks="6" gainhpamount="50" gainmanaticks="3" gainmanaamount="70" manamultiplier="1.1" attackspeed="500" soulmax="100" gainsoulticks="120" fromvoc="1">
<formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/>
<skill fist="1.5" club="2.0" sword="2.0" axe="2.0" distance="2.0" shielding="1.5" fishing="1.1" experience="1.0"/>
</vocation>
<vocation id="2" name="Priest" description="a priest" needpremium="0" gaincap="10" gainhp="5" gainmana="30" gainhpticks="6" gainhpamount="50" gainmanaticks="3" gainmanaamount="70" manamultiplier="1.1" attackspeed="500" soulmax="100" gainsoulticks="120" fromvoc="2">
<formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/>
<skill fist="1.5" club="1.8" sword="1.8" axe="1.8" distance="1.8" shielding="1.5" fishing="1.1" experience="1.0"/>
</vocation>
<vocation id="3" name="Archer" description="a archer" needpremium="0" gaincap="20" gainhp="10" gainmana="15" gainhpticks="4" gainhpamount="65" gainmanaticks="4" gainmanaamount="60" manamultiplier="1.4" attackspeed="500" soulmax="100" gainsoulticks="120" fromvoc="3">
<formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/>
<skill fist="1.2" club="1.2" sword="1.2" axe="1.2" distance="1.1" shielding="1.1" fishing="1.1" experience="1.0"/>
</vocation>
<vocation id="4" name="Guardian" description="a guardian" needpremium="0" gaincap="25" gainhp="15" gainmana="5" gainhpticks="3" gainhpamount="80" gainmanaticks="6" gainmanaamount="40" manamultiplier="3.0" attackspeed="500" soulmax="100" gainsoulticks="120" fromvoc="4">
<formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/>
<skill fist="1.1" club="1.1" sword="1.1" axe="1.1" distance="1.4" shielding="1.1" fishing="1.1" experience="1.0"/>
</vocation>
<vocation id="5" name="Powerful Wizard" description="a powerful Wizard" needpremium="1" gaincap="10" gainhp="5" gainmana="30" gainhpticks="4" gainhpamount="100" gainmanaticks="2" gainmanaamount="150" manamultiplier="1.1" attackspeed="500" soulmax="200" gainsoulticks="15" fromvoc="1" lessloss="30">
<formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/>
<skill fist="1.5" club="2.0" sword="2.0" axe="2.0" distance="2.0" shielding="1.5" fishing="1.1" experience="1.0"/>
</vocation>
<vocation id="6" name="Divine" description="an divine" needpremium="1" gaincap="10" gainhp="5" gainmana="30" gainhpticks="4" gainhpamount="100" gainmanaticks="2" gainmanaamount="150" manamultiplier="1.1" attackspeed="500" soulmax="200" gainsoulticks="15" fromvoc="2" lessloss="30">
<formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/>
<skill fist="1.5" club="1.8" sword="1.8" axe="1.8" distance="1.8" shielding="1.5" fishing="1.1" experience="1.0"/>
</vocation>
<vocation id="7" name="Sniper" description="a sniper" needpremium="1" gaincap="20" gainhp="10" gainmana="15" gainhpticks="3" gainhpamount="150" gainmanaticks="3" gainmanaamount="130" manamultiplier="1.4" attackspeed="500" soulmax="200" gainsoulticks="15" fromvoc="3" lessloss="30">
<formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/>
<skill fist="1.2" club="1.2" sword="1.2" axe="1.2" distance="1.1" shielding="1.1" fishing="1.1" experience="1.0"/>
</vocation>
<vocation id="8" name="Horseman" description="an horseman" needpremium="1" gaincap="25" gainhp="15" gainmana="5" gainhpticks="2" gainhpamount="170" gainmanaticks="4" gainmanaamount="80" manamultiplier="3.0" attackspeed="500" soulmax="200" gainsoulticks="15" fromvoc="4" lessloss="30">
<formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/>
<skill fist="1.1" club="1.1" sword="1.1" axe="1.1" distance="1.4" shielding="1.1" fishing="1.1" experience="1.0"/>
</vocation>
<!--
<vocation id="9" name="Dark Mage" description="an dark mage" needpremium="0" gaincap="10" gainhp="5" gainmana="30" gainhpticks="4" gainhpamount="10" gainmanaticks="2" gainmanaamount="10" manamultiplier="1.1" attackspeed="2000" soulmax="200" gainsoulticks="15" fromvoc="5" lessloss="50">
<formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/>
<skill fist="1.5" club="2.0" sword="2.0" axe="2.0" distance="2.0" shielding="1.5" fishing="1.1" experience="1.0"/>
</vocation>
<vocation id="10" name="Cleric" description="an cleric" needpremium="0" gaincap="10" gainhp="5" gainmana="30" gainhpticks="4" gainhpamount="10" gainmanaticks="2" gainmanaamount="10" manamultiplier="1.1" attackspeed="2000" soulmax="200" gainsoulticks="15" fromvoc="6" lessloss="50">
<formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/>
<skill fist="1.5" club="1.8" sword="1.8" axe="1.8" distance="1.8" shielding="1.5" fishing="1.1" experience="1.0"/>
</vocation>
<vocation id="11" name="Striker" description="an Striker" needpremium="0" gaincap="20" gainhp="10" gainmana="15" gainhpticks="3" gainhpamount="10" gainmanaticks="3" gainmanaamount="10" manamultiplier="1.4" attackspeed="2000" soulmax="200" gainsoulticks="15" fromvoc="7" lessloss="50">
<formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/>
<skill fist="1.2" club="1.2" sword="1.2" axe="1.2" distance="1.1" shielding="1.1" fishing="1.1" experience="1.0"/>
</vocation>
<vocation id="12" name="Heavy Tanker" description="an heavy tanker" needpremium="0" gaincap="25" gainhp="15" gainmana="5" gainhpticks="8" gainhpamount="10" gainmanaticks="4" gainmanaamount="10" manamultiplier="3.0" attackspeed="2000" soulmax="200" gainsoulticks="15" fromvoc="8" lessloss="50">
<formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/>
<skill fist="1.1" club="1.1" sword="1.1" axe="1.1" distance="1.4" shielding="1.1" fishing="1.1" experience="1.0"/>
</vocation>
-->
</vocations>
------------------------
local keywordHandler = KeywordHandler:new()local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)
local talkState = {}
function onCreatureAppear(cid) npcHandler:onCreatureAppear(cid) end
function onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid) end
function onCreatureSay(cid, type, msg) npcHandler:onCreatureSay(cid, type, msg) end
function onThink() npcHandler:onThink() end
local shopModule = ShopModule:new()
npcHandler:addModule(shopModule)
shopModule:addBuyableItem({'Leaf Legs'}, 9928, 20000, 'Leaf Legs')
shopModule:addBuyableItem({'Draken Boots'}), 12607, 20000, 'Draken Boots')
shopModule:addBuyableItem({'Coconut Shoes'}), 9931, 20000, 'Coconut Shoes')
shopModule:addBuyableItem({'Twiceslicer'}), 12574, 20000, 'Twiceslicer')
shopModule:addBuyableItem({'Drakinata'}), 11299, 20000, 'Drakinata')
shopModule:addBuyableItem({'Blade of Corruption'}), 12610, 20000, 'Blade of Corruption')
shopModule:addBuyableItem({'Sais'}), 11300, 20000, 'Sais')
shopModule:addBuyableItem({'Drachaku'}), 11302, 20000, 'Drachaku')
shopModule:addBuyableItem({'Elite Draken Helmet'}), 12606, 20000, 'Elite Draken Helmet')
shopModule:addBuyableItem({'Mighty Helm of Green Sparks'}), 10316, 20000, 'Mighty Helm of Green Sparks')
shopModule:addBuyableItem({'Elite Draken Mail'}), 12568, 20000, 'Elite Draken Mail')
shopModule:addBuyableItem({'Royal Draken Mail'}), 12603, 20000, 'Royal Draken Mail')
local items = {[1] = 12603, [2] = 12606, [5] = 12610, [6] = 12603}
function creatureSayCallback(cid, type, msg)
if(not npcHandler:isFocused(cid)) then
return false
end
local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and 0 or cid
if(msgcontains(msg, 'first rod') or msgcontains(msg, 'first wand')) then
if(isSorcerer(cid) or isDruid(cid)) then
if(getPlayerStorageValue(cid, 30002) <= 0) then
selfSay('So you ask me for a {' .. getItemNameById(items[getPlayerVocation(cid)]) .. '} to begin your advanture?', cid)
talkState[talkUser] = 1
else
selfSay('What? I have already gave you one {' .. getItemNameById(items[getPlayerVocation(cid)]) .. '}!', cid)
end
else
selfSay('Sorry, you aren\'t a druid either a sorcerer.', cid)
end
elseif(msgcontains(msg, 'yes')) then
if(talkState[talkUser] == 1) then
doPlayerAddItem(cid, items[getPlayerVocation(cid)], 1)
selfSay('Here you are young adept, take care yourself.', cid)
setPlayerStorageValue(cid, 30002, 1)
end
talkState[talkUser] = 0
elseif(msgcontains(msg, 'no') and isInArray({1}, talkState[talkUser])) then
selfSay('Ok then.', cid)
talkState[talkUser] = 0
end
return true
end
npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new())
A versão é 8.6
xaau
-
Quem Está Navegando 0 membros estão online
- Nenhum usuário registrado visualizando esta página.
Sistema De Reflect Damage.
em Mods, funções e outros
Postado · Editado por LipeFioravanti
ah axo que não fiz isso, tem como me explicar ?
sou noob nessas paradas ai ainda, comecei mecher semana retrasada
bom, de qualquer jeito obrigado por tentar estar me ajudando, rep+ pra vc ^^
EDIT-
ai, botei o script de add no talkaction e funcionou, n tinha feito isso porque nao tinha entendido
agora funcionou
valeu /o\
---
no caso, pra deixar infinito, o script ficaria como ?