Ir para conteúdo
  • Cadastre-se

Posts Recomendados

Fala galera!

O NPC do meu servidor está bugado!

por exemplo, vou comprar apenas 100 uh, ele compra 200... assim funciona na hora de vender tb!

ta prejudicando muito os players! quem puder ajudar, agradeço!

tumblr_o70wteR8521r9n6kzo1_400.gif

Link para o post
Compartilhar em outros sites

verefica se no NPC.XML também tem algo de BUY/SELL

isso acontecia comigo, eu comprava 1 wand vinha duas, ou então troca todo LUA;

 

<?xml version="1.0" encoding="UTF-8"?>
<npc name="Eryn" script="runes.lua" walkinterval="2000" floorchange="0">
	<health now="100" max="100" />
	<look type="136" head="58" body="84" legs="86" feet="114" addons="0" />
	<parameters>
		<parameter key="module_shop" value="1" />
		<parameter key="shop_buyable" value="
			avalanche rune,2274,25;
			blank rune,2260,10;
			chameleon rune,2291,210;
			convince creature rune,2290,80;
			cure poison rune,2266,65;
			destroy field rune,2261,15;
			energy field rune,2277,38;
			energy wall rune,2279,85;
			explosion rune,2313,31;
			fire bomb rune,2305,55;
			fire field rune,2301,28;
			fire wall rune,2303,61;
			great fireball rune,2304,45;
			great health potion,7591,190;
			great mana potion,7590,120;
			great spirit potion,8472,190;
			health potion,7618,45;
			heavy magic missile rune,2311,12;
			intense healing rune,2265,95;
			light magic missile rune,2287,4;
			mana potion,7620,50;
			moonlight rod,2186,1000;
			necrotic rod,2185,5000;
			poison field rune,2285,21;
			poison wall rune,2289,52;
			snakebite rod,2182,500;
			spellbook,2175,150;
			stalagmite rune,2292,12;
			strong health potion,7588,100;
			strong mana potion,7589,80;
			sudden death rune,2268,50;
			terra rod,2181,10000;
			
			Hailstorm Rod,2183,15000;
			Wand of Voodoo,8922,22000;
			
			ultimate healing rune,2273,175;
			ultimate health potion,8473,310;
			wand of cosmic energy,2189,10000;
			wand of decay,2188,5000;
			wand of dragonbreath,2191,1000;
			wand of vortex,2190,500;" />
		<parameter key="shop_sellable" value="
			ankh, 2193, 100;
			hailstorm rod, 2183, 3000;
			moonlight rod, 2186, 200;
			mysterious fetish, 2194, 50;
			necrotic rod, 2185, 1000;
			northwind rod, 8911, 1500;
			snakebite rod, 2182, 100;
			springsprout rod, 8912, 3600;
			terra rod, 2181, 2000;
			underworld rod, 8910, 4400;
			stone skin amulet, 2197, 500;
			wand of cosmic energy, 2189, 2000;
			wand of decay, 2188, 1000;
			wand of dragonbreath, 2191, 200;
			wand of inferno, 2187, 3000;
			wand of vortex, 2190, 100;
			wand of draconia, 8921, 1500;
			wand of starstorm, 8920, 3600;
			wand of voodoo, 8922, 4400;
			magic light wand, 2162, 35;
			life crystal, 4851, 50;
			mind stone, 2178, 100" />
	</parameters>
</npc>
local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)

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

keywordHandler:addKeyword({'magic'}, StdModule.say, {npcHandler = npcHandler, text = "Okay, then just browse through all of my wares."})

local function creatureSayCallback(cid, type, msg)
	if not npcHandler:isFocused(cid) then
		return false
	end
	local player = Player(cid)
	local items = {[1] = 2190, [2] = 2182}
	local itemId = items[player:getVocation():getBase():getId()]
	if msgcontains(msg, 'first rod') or msgcontains(msg, 'first wand') then
		if player:isMage() then
			if player:getStorageValue(Storage.firstMageWeapon) == -1 then
				npcHandler:say('So you ask me for a {' .. ItemType(itemId):getName() .. '} to begin your adventure?', cid)
				npcHandler.topic[cid] = 1
			else
				npcHandler:say('What? I have already gave you one {' .. ItemType(itemId):getName() .. '}!', cid)
			end
		else
			npcHandler:say('Sorry, you aren\'t a druid either a sorcerer.', cid)
		end
	elseif msgcontains(msg, 'yes') then
		if npcHandler.topic[cid] == 1 then
			player:addItem(itemId, 1)
			npcHandler:say('Here you are young adept, take care yourself.', cid)
			player:setStorageValue(Storage.firstMageWeapon, 1)
		end
		npcHandler.topic[cid] = 0
	elseif msgcontains(msg, 'no') and npcHandler.topic[cid] == 1 then
		npcHandler:say('Ok then.', cid)
		npcHandler.topic[cid] = 0
	end
	return true
end

npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:setMessage(MESSAGE_GREET, "Welcome |PLAYERNAME|! Whats your need?")
npcHandler:setMessage(MESSAGE_FAREWELL, "Good bye, |PLAYERNAME|.")
npcHandler:setMessage(MESSAGE_WALKAWAY, "Good bye, |PLAYERNAME|.")
npcHandler:setMessage(MESSAGE_SENDTRADE, "Of course, just browse through my wares. Or do you want to look only at {potions}, {wands} or {runes}?")
npcHandler:addModule(FocusModule:new())

 

Editado por Jobs (veja o histórico de edições)
Link para o post
Compartilhar em outros sites

o buy fica no xml e o sell, no .lua, mas acontece do mesmo jeito!

xml:

Spoiler

<?xml version="1.0" encoding="UTF-8"?>
<npc name="Traveller" nameDescription="Traveller" script="traveller.lua" walkinterval="2000" floorchange="1" skull="red">
    <health now="100" max="100"/>
    <look type="580" head="114" body="78" legs="76" feet="115" addons="3"/>
    <parameters>
            <parameter key="module_shop" value="1" />
        <parameter key="message_greet" value="Hello |PLAYERNAME|.I am a dwarf and a great buyer of rarities tell {trade} to see what I am interested in buying! "/>
        <parameter key="message_alreadyfocused" value="You are drunk? I'm talking with you!"/>
        <parameter key="message_farewell" value="Bye, See you later!"/>
        <parameter key="shop_buyable" value="dark sudden death,2263,10000;dark explosion rune,2312,5000"/>
    </parameters>
</npc>

 

.lua

Spoiler

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)

---------------------------------------- crossbow ---------------------------------------- 
shopModule:addSellableItem({'arbalest'},        5803,  500000,      'arbalest')
shopModule:addSellableItem({'elven crossbow'},          12711, 1000000,     'elven crossbow')
shopModule:addSellableItem({'celestial crossbow'},      12710, 1500000,     'celestial crossbow')

---------------------------------------- axes ----------------------------------------
shopModule:addSellableItem({"ravager's axe"},           2443,  200000,     "ravager's axe")
shopModule:addSellableItem({'stonecutter axe'},         2431,  300000,     'stonecutter axe')
shopModule:addSellableItem({"great axe"},                  2415,  500000,     'great axe')
shopModule:addSellableItem({'toguro hammer'},           13028, 1000000,    'toguro hammer')
shopModule:addSellableItem({'adamantiun axe'},          12718, 3000000,    'adamantiun axe')
shopModule:addSellableItem({'mithril axe'},              13149, 2000000,    'mithril axe')
shopModule:addSellableItem({'diamond axe '},              13019, 2000000,    'diamond axe ')
shopModule:addSellableItem({'dragonslayer axe'},        12719, 3000000,    'dragonslayer axe')
shopModule:addSellableItem({'axe of thor'},                13018, 3000000,    'axe of thor')
shopModule:addSellableItem({'dommed axe'},              12721, 6000000,    'dommed axe')
shopModule:addSellableItem({'jomungard axe'},           12722, 3000000,    'jomungard axe')
shopModule:addSellableItem({'magma axe'},                  12723, 4000000,    'magma axe')
--shopModule:addSellableItem({'bloodhunter axe'},         12724, 5200000,    'bloodhunter axe')

---------------------------------------- clubs ---------------------------------------- 
shopModule:addSellableItem({'demonbone'},                  7431,  50000,       'demonbone')
shopModule:addSellableItem({'hammer of wrath'},         2444,  200000,      'hammer of wrath')
shopModule:addSellableItem({'orcish maul'},              7392,  200000,      'orcish maul')
shopModule:addSellableItem({'heavy mace'},              2452,  300000,      'heavy mace')
shopModule:addSellableItem({'thunder hammer'},          2421,  100000,      'thunder hammer')
shopModule:addSellableItem({'mace of fury'},              12729, 2500000,     'mace of fury')
shopModule:addSellableItem({'greatsmith hammer'},       12726, 3000000,     'greatsmith hammer')
shopModule:addSellableItem({'hammer of hercules'},      13011, 6000000,     'hammer of hercules')

---------------------------------------- fists ---------------------------------------- 
shopModule:addSellableItem({'iron gloves'},              13016, 3000000,     'iron gloves')
shopModule:addSellableItem({'four blades'},              13015, 3000000,     'four blades')
shopModule:addSellableItem({'golden gloves'},              13017, 3000000,     'golden gloves')
shopModule:addSellableItem({'spyked grinder'},          13013, 1500000,     'spyked grinder')
shopModule:addSellableItem({'fist butcher'},              13014, 100000,      'fist butcher')

---------------------------------------- swords ---------------------------------------- 
shopModule:addSellableItem({'magic longsword'},         2390,  200000,      'magic longsword')
shopModule:addSellableItem({'magic sword'},              2400,  100000,      'magic sword')
shopModule:addSellableItem({'warlord sword'},              2408,  100000,      'warlord sword')
shopModule:addSellableItem({'helical sword'},             13040, 2000000,     'helical sword')
shopModule:addSellableItem({'divine sword'},             12756, 6000000,     'divine sword')
shopModule:addSellableItem({'alabarda of fire'},        12757, 2500000,     'alabarda of fire')
shopModule:addSellableItem({'sword of teseu'},          12758, 2000000,     'sword of teseu')
shopModule:addSellableItem({'thurdillion sword'},       12759, 5000000,     'thurdillion sword')


---------------------------------------- helmets ---------------------------------------- 

shopModule:addSellableItem({'winged helemt'},              2474,  100000,    'winged helmet')
shopModule:addSellableItem({'magic plate helmet'},      12775, 500000,    'magic plate helmet')
shopModule:addSellableItem({'infantry helmet'},         13124, 500000,    'infantry helmet')
shopModule:addSellableItem({'elven helmet'},              2506,  1000000,   'elven helmet')
shopModule:addSellableItem({'mind helmet'},              12773, 1000000,   'mind helmet')
shopModule:addSellableItem({'horned helmet'},              2496,  1000000,   'horned helmet')
shopModule:addSellableItem({'gladiator helmet'},        12776, 1500000,   'gladiator helmet')
shopModule:addSellableItem({'venom scale helmet'},      12790, 1800000,   'venom scale helmet')
shopModule:addSellableItem({'phoenix helmet'},          12771, 2000000,   'phoenix helmet')
shopModule:addSellableItem({'darkness scale helmet'},   12797, 2300000,   'darkness scale helmet')
shopModule:addSellableItem({'magic golden helmet'},     12791, 3000000,   'magic golden helmet')
shopModule:addSellableItem({'demoniac helmet'},         12772, 3000000,   'demoniac helmet')
shopModule:addSellableItem({"naz'gul scale helmet"},    12784, 4000000,   "naz'gul scale helmet")
shopModule:addSellableItem({'saruman hat'},              12777, 4000000,   'saruman hat')
shopModule:addSellableItem({'soul helmet'},              12778, 5000000,   'soul helmet')
shopModule:addSellableItem({'legendary helmet'},        12779, 6000000,   'legendary helmet')

---------------------------------------- armors ----------------------------------------


shopModule:addSellableItem({'spyked armor'},              12799, 250000,      'spyked armor')
shopModule:addSellableItem({'elven armor'},              12815, 250000,      'elven armor')
shopModule:addSellableItem({'rustic armor'},              12810, 300000,      'rustic armor')
shopModule:addSellableItem({'arcane robe'},              2508,  500000,      'arcane robe') 
shopModule:addSellableItem({'elven armor'},              2505,  1000000,     'elven armor')
shopModule:addSellableItem({'mind robe'},                  12824, 1000000,     'mind robe')
shopModule:addSellableItem({'horned armor'},              12800, 1500000,     'horned armor')
shopModule:addSellableItem({'cursed armor'},              12809, 2000000,     'cursed armor')
shopModule:addSellableItem({'swamplair armor'},         8880, 2000000,     'swamplair armor')
shopModule:addSellableItem({'gladiator armor'},         12804, 2000000,     'gladiator armor')
shopModule:addSellableItem({'venom scale robe'},        12822, 2300000,     'venom scale robe')
shopModule:addSellableItem({'phoenix armor'},              12823, 2300000,     'phoenix armor')
shopModule:addSellableItem({'demoniac robe'},              12813, 2500000,     'demoniac robe')
shopModule:addSellableItem({'blacksmith armor'},        12659, 2500000,     'blacksmith armor')
shopModule:addSellableItem({'shadow armor'},            12801, 3000000,     'shadow armor')
shopModule:addSellableItem({'magic golden armor'},      12806, 4000000,     'magic golden armor')
shopModule:addSellableItem({"naz'gul scale mail"},      12807, 5000000,     "naz'gul scale mail")
shopModule:addSellableItem({'soul armor'},              12805, 6000000,     'soul armor')
shopModule:addSellableItem({'saruman robe'},            12825, 6000000,     'saruman robe')
shopModule:addSellableItem({'legendary armor'},         12808, 7000000,     'legendary armor')

---------------------------------------- Legs ----------------------------------------
shopModule:addSellableItem({'magic plate legs'},     12820, 500000,    'magic plate legs')
shopModule:addSellableItem({'elven legs'},              2507,  700000,    'elven legs')
shopModule:addSellableItem({'gladiator legs'},       12818, 1000000,   'gladiator legs')
shopModule:addSellableItem({'magic golden legs'},    13431, 2000000,   'magic golden legs')
shopModule:addSellableItem({"naz'gul scale legs"},   12817, 3000000,   "naz'gul scale legs")
shopModule:addSellableItem({'soul legs'},            12816, 4000000,   'soul legs')
shopModule:addSellableItem({'saruman legs'},         12819, 5000000,   'saruman legs')
shopModule:addSellableItem({'legendary legs'},       12821, 6000000,   'legendary legs')

---------------------------------------- Boots ----------------------------------------

shopModule:addSellableItem({'shyne boots'},             12997,  250000,    'shyne boots')
shopModule:addSellableItem({'soft boots'},              6132,  300000,     'soft boots')
shopModule:addSellableItem({'firewalker boots'},        9933,  700000,     'firewalker boots')

---------------------------------------- shields ---------------------------------------- 

shopModule:addSellableItem({'plasma shield'},              2542 , 200000,     'plasma shield')
shopModule:addSellableItem({'great shield'},              2522 , 300000,     'great shield')
shopModule:addSellableItem({'blessed shield'},          2523 , 400000,     'blessed shield')
shopModule:addSellableItem({'mind shield'},              12829, 500000,     'mind shield')
shopModule:addSellableItem({'darkness shield'},         12832, 700000,     'darkness shield')
shopModule:addSellableItem({'horned shield'},              12838, 800000,     'horned shield')
shopModule:addSellableItem({'toguro shield'},          12835,  1000000,    'toguro shield')
shopModule:addSellableItem({'phoenix shield'},          12837,  1000000,    'phoenix shield')
shopModule:addSellableItem({'venom scale shield'},      12836, 1000000,    'venom scale shield')
shopModule:addSellableItem({'balrog shield'},             12831, 1300000,    'balrog shield')
shopModule:addSellableItem({'shadow shield'},              12839, 1500000,    'shadow shield')

---------------------------------------- wands ---------------------------------------- 
shopModule:addSellableItem({'arcane wand'},              2453, 100000,       'arcane wand')
shopModule:addSellableItem({'mind wand'},                  7426, 500000,       'mind wand')
shopModule:addSellableItem({'venom wand'},              12739, 1500000,     'venom wand')
shopModule:addSellableItem({'phoenix wand'},              12740, 1700000,     'phoenix wand')
shopModule:addSellableItem({'persefone staff'},           12741, 3000000,     'persefone staff')
shopModule:addSellableItem({'magic plague wand'},       13126, 4000000,     'magic plague wand')
shopModule:addSellableItem({'saruman staff'},              12736, 6000000,     'saruman staff')

local items = {[1] = 2190, [2] = 2182, [5] = 2190, [6] = 2182}
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, '') or msgcontains(msg, '')) 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('...', cid)
end
elseif(msgcontains(msg, '')) 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, '') 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())

 

@Jobs

tumblr_o70wteR8521r9n6kzo1_400.gif

Link para o post
Compartilhar em outros sites
3 horas atrás, Yamborghini disse:

o buy fica no xml e o sell, no .lua, mas acontece do mesmo jeito!

xml:

  Mostrar conteúdo oculto

<?xml version="1.0" encoding="UTF-8"?>
<npc name="Traveller" nameDescription="Traveller" script="traveller.lua" walkinterval="2000" floorchange="1" skull="red">
    <health now="100" max="100"/>
    <look type="580" head="114" body="78" legs="76" feet="115" addons="3"/>
    <parameters>
            <parameter key="module_shop" value="1" />
        <parameter key="message_greet" value="Hello |PLAYERNAME|.I am a dwarf and a great buyer of rarities tell {trade} to see what I am interested in buying! "/>
        <parameter key="message_alreadyfocused" value="You are drunk? I'm talking with you!"/>
        <parameter key="message_farewell" value="Bye, See you later!"/>
        <parameter key="shop_buyable" value="dark sudden death,2263,10000;dark explosion rune,2312,5000"/>
    </parameters>
</npc>

 

.lua

  Ocultar conteúdo

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)

---------------------------------------- crossbow ---------------------------------------- 
shopModule:addSellableItem({'arbalest'},        5803,  500000,      'arbalest')
shopModule:addSellableItem({'elven crossbow'},          12711, 1000000,     'elven crossbow')
shopModule:addSellableItem({'celestial crossbow'},      12710, 1500000,     'celestial crossbow')

---------------------------------------- axes ----------------------------------------
shopModule:addSellableItem({"ravager's axe"},           2443,  200000,     "ravager's axe")
shopModule:addSellableItem({'stonecutter axe'},         2431,  300000,     'stonecutter axe')
shopModule:addSellableItem({"great axe"},                  2415,  500000,     'great axe')
shopModule:addSellableItem({'toguro hammer'},           13028, 1000000,    'toguro hammer')
shopModule:addSellableItem({'adamantiun axe'},          12718, 3000000,    'adamantiun axe')
shopModule:addSellableItem({'mithril axe'},              13149, 2000000,    'mithril axe')
shopModule:addSellableItem({'diamond axe '},              13019, 2000000,    'diamond axe ')
shopModule:addSellableItem({'dragonslayer axe'},        12719, 3000000,    'dragonslayer axe')
shopModule:addSellableItem({'axe of thor'},                13018, 3000000,    'axe of thor')
shopModule:addSellableItem({'dommed axe'},              12721, 6000000,    'dommed axe')
shopModule:addSellableItem({'jomungard axe'},           12722, 3000000,    'jomungard axe')
shopModule:addSellableItem({'magma axe'},                  12723, 4000000,    'magma axe')
--shopModule:addSellableItem({'bloodhunter axe'},         12724, 5200000,    'bloodhunter axe')

---------------------------------------- clubs ---------------------------------------- 
shopModule:addSellableItem({'demonbone'},                  7431,  50000,       'demonbone')
shopModule:addSellableItem({'hammer of wrath'},         2444,  200000,      'hammer of wrath')
shopModule:addSellableItem({'orcish maul'},              7392,  200000,      'orcish maul')
shopModule:addSellableItem({'heavy mace'},              2452,  300000,      'heavy mace')
shopModule:addSellableItem({'thunder hammer'},          2421,  100000,      'thunder hammer')
shopModule:addSellableItem({'mace of fury'},              12729, 2500000,     'mace of fury')
shopModule:addSellableItem({'greatsmith hammer'},       12726, 3000000,     'greatsmith hammer')
shopModule:addSellableItem({'hammer of hercules'},      13011, 6000000,     'hammer of hercules')

---------------------------------------- fists ---------------------------------------- 
shopModule:addSellableItem({'iron gloves'},              13016, 3000000,     'iron gloves')
shopModule:addSellableItem({'four blades'},              13015, 3000000,     'four blades')
shopModule:addSellableItem({'golden gloves'},              13017, 3000000,     'golden gloves')
shopModule:addSellableItem({'spyked grinder'},          13013, 1500000,     'spyked grinder')
shopModule:addSellableItem({'fist butcher'},              13014, 100000,      'fist butcher')

---------------------------------------- swords ---------------------------------------- 
shopModule:addSellableItem({'magic longsword'},         2390,  200000,      'magic longsword')
shopModule:addSellableItem({'magic sword'},              2400,  100000,      'magic sword')
shopModule:addSellableItem({'warlord sword'},              2408,  100000,      'warlord sword')
shopModule:addSellableItem({'helical sword'},             13040, 2000000,     'helical sword')
shopModule:addSellableItem({'divine sword'},             12756, 6000000,     'divine sword')
shopModule:addSellableItem({'alabarda of fire'},        12757, 2500000,     'alabarda of fire')
shopModule:addSellableItem({'sword of teseu'},          12758, 2000000,     'sword of teseu')
shopModule:addSellableItem({'thurdillion sword'},       12759, 5000000,     'thurdillion sword')


---------------------------------------- helmets ---------------------------------------- 

shopModule:addSellableItem({'winged helemt'},              2474,  100000,    'winged helmet')
shopModule:addSellableItem({'magic plate helmet'},      12775, 500000,    'magic plate helmet')
shopModule:addSellableItem({'infantry helmet'},         13124, 500000,    'infantry helmet')
shopModule:addSellableItem({'elven helmet'},              2506,  1000000,   'elven helmet')
shopModule:addSellableItem({'mind helmet'},              12773, 1000000,   'mind helmet')
shopModule:addSellableItem({'horned helmet'},              2496,  1000000,   'horned helmet')
shopModule:addSellableItem({'gladiator helmet'},        12776, 1500000,   'gladiator helmet')
shopModule:addSellableItem({'venom scale helmet'},      12790, 1800000,   'venom scale helmet')
shopModule:addSellableItem({'phoenix helmet'},          12771, 2000000,   'phoenix helmet')
shopModule:addSellableItem({'darkness scale helmet'},   12797, 2300000,   'darkness scale helmet')
shopModule:addSellableItem({'magic golden helmet'},     12791, 3000000,   'magic golden helmet')
shopModule:addSellableItem({'demoniac helmet'},         12772, 3000000,   'demoniac helmet')
shopModule:addSellableItem({"naz'gul scale helmet"},    12784, 4000000,   "naz'gul scale helmet")
shopModule:addSellableItem({'saruman hat'},              12777, 4000000,   'saruman hat')
shopModule:addSellableItem({'soul helmet'},              12778, 5000000,   'soul helmet')
shopModule:addSellableItem({'legendary helmet'},        12779, 6000000,   'legendary helmet')

---------------------------------------- armors ----------------------------------------


shopModule:addSellableItem({'spyked armor'},              12799, 250000,      'spyked armor')
shopModule:addSellableItem({'elven armor'},              12815, 250000,      'elven armor')
shopModule:addSellableItem({'rustic armor'},              12810, 300000,      'rustic armor')
shopModule:addSellableItem({'arcane robe'},              2508,  500000,      'arcane robe') 
shopModule:addSellableItem({'elven armor'},              2505,  1000000,     'elven armor')
shopModule:addSellableItem({'mind robe'},                  12824, 1000000,     'mind robe')
shopModule:addSellableItem({'horned armor'},              12800, 1500000,     'horned armor')
shopModule:addSellableItem({'cursed armor'},              12809, 2000000,     'cursed armor')
shopModule:addSellableItem({'swamplair armor'},         8880, 2000000,     'swamplair armor')
shopModule:addSellableItem({'gladiator armor'},         12804, 2000000,     'gladiator armor')
shopModule:addSellableItem({'venom scale robe'},        12822, 2300000,     'venom scale robe')
shopModule:addSellableItem({'phoenix armor'},              12823, 2300000,     'phoenix armor')
shopModule:addSellableItem({'demoniac robe'},              12813, 2500000,     'demoniac robe')
shopModule:addSellableItem({'blacksmith armor'},        12659, 2500000,     'blacksmith armor')
shopModule:addSellableItem({'shadow armor'},            12801, 3000000,     'shadow armor')
shopModule:addSellableItem({'magic golden armor'},      12806, 4000000,     'magic golden armor')
shopModule:addSellableItem({"naz'gul scale mail"},      12807, 5000000,     "naz'gul scale mail")
shopModule:addSellableItem({'soul armor'},              12805, 6000000,     'soul armor')
shopModule:addSellableItem({'saruman robe'},            12825, 6000000,     'saruman robe')
shopModule:addSellableItem({'legendary armor'},         12808, 7000000,     'legendary armor')

---------------------------------------- Legs ----------------------------------------
shopModule:addSellableItem({'magic plate legs'},     12820, 500000,    'magic plate legs')
shopModule:addSellableItem({'elven legs'},              2507,  700000,    'elven legs')
shopModule:addSellableItem({'gladiator legs'},       12818, 1000000,   'gladiator legs')
shopModule:addSellableItem({'magic golden legs'},    13431, 2000000,   'magic golden legs')
shopModule:addSellableItem({"naz'gul scale legs"},   12817, 3000000,   "naz'gul scale legs")
shopModule:addSellableItem({'soul legs'},            12816, 4000000,   'soul legs')
shopModule:addSellableItem({'saruman legs'},         12819, 5000000,   'saruman legs')
shopModule:addSellableItem({'legendary legs'},       12821, 6000000,   'legendary legs')

---------------------------------------- Boots ----------------------------------------

shopModule:addSellableItem({'shyne boots'},             12997,  250000,    'shyne boots')
shopModule:addSellableItem({'soft boots'},              6132,  300000,     'soft boots')
shopModule:addSellableItem({'firewalker boots'},        9933,  700000,     'firewalker boots')

---------------------------------------- shields ---------------------------------------- 

shopModule:addSellableItem({'plasma shield'},              2542 , 200000,     'plasma shield')
shopModule:addSellableItem({'great shield'},              2522 , 300000,     'great shield')
shopModule:addSellableItem({'blessed shield'},          2523 , 400000,     'blessed shield')
shopModule:addSellableItem({'mind shield'},              12829, 500000,     'mind shield')
shopModule:addSellableItem({'darkness shield'},         12832, 700000,     'darkness shield')
shopModule:addSellableItem({'horned shield'},              12838, 800000,     'horned shield')
shopModule:addSellableItem({'toguro shield'},          12835,  1000000,    'toguro shield')
shopModule:addSellableItem({'phoenix shield'},          12837,  1000000,    'phoenix shield')
shopModule:addSellableItem({'venom scale shield'},      12836, 1000000,    'venom scale shield')
shopModule:addSellableItem({'balrog shield'},             12831, 1300000,    'balrog shield')
shopModule:addSellableItem({'shadow shield'},              12839, 1500000,    'shadow shield')

---------------------------------------- wands ---------------------------------------- 
shopModule:addSellableItem({'arcane wand'},              2453, 100000,       'arcane wand')
shopModule:addSellableItem({'mind wand'},                  7426, 500000,       'mind wand')
shopModule:addSellableItem({'venom wand'},              12739, 1500000,     'venom wand')
shopModule:addSellableItem({'phoenix wand'},              12740, 1700000,     'phoenix wand')
shopModule:addSellableItem({'persefone staff'},           12741, 3000000,     'persefone staff')
shopModule:addSellableItem({'magic plague wand'},       13126, 4000000,     'magic plague wand')
shopModule:addSellableItem({'saruman staff'},              12736, 6000000,     'saruman staff')

local items = {[1] = 2190, [2] = 2182, [5] = 2190, [6] = 2182}
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, '') or msgcontains(msg, '')) 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('...', cid)
end
elseif(msgcontains(msg, '')) 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, '') 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())

 

@Jobs

 

perdão, eu até vi, porém não entendo lua, vê se os amigos podem te ajudar.

@Sttorm @KotZletY

Link para o post
Compartilhar em outros sites

Participe da conversa

Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.

Visitante
Responder

×   Você colou conteúdo com formatação.   Remover formatação

  Apenas 75 emojis são permitidos.

×   Seu link foi automaticamente incorporado.   Mostrar como link

×   Seu conteúdo anterior foi restaurado.   Limpar o editor

×   Não é possível colar imagens diretamente. Carregar ou inserir imagens do URL.

  • Quem Está Navegando   0 membros estão online

    Nenhum usuário registrado visualizando esta página.

  • Conteúdo Similar

    • Por matheuzinPXT
      Iae meus queridos, boa noite. 

      Jogava na época do 8.60. Tenho vontade de montar um server, e fico com algumas dúvidas.
       
      Vejo alguns servidores com sistemas bem diferentes, asas nos personagens, várias sprites, os itens que possuem efeitos/animações estão rápidos igual as versões 12+
       
      Como funciona? É feito um cliente próprio para essas alterações ou utilizado o próprio da cip mesmo?
       
      Estou começando a estudar programação, e quero aprender mais sobre o jogo
       
    • Por DiigooMix
      Olá pessoal, gostaria de saber como posso resolver esse problema de login failed no cliente 13x.

       
      Server que estou usando como base: Canary 13x
      Cliente com IP configurado
      Não sei se tem algo errado com isso, mas mesmo com a distro mostrando "server online", no site aparece "server offline"

       
      Site que estou usando: Canary AAC
      Li em muitos posts que pode ser algo relacionado com o "login.lua", mas não achei esse arquivo  para o site Canary AAC. Se houver alguém com este arquivo, poderia me disponibilizar, por gentileza?
       
       
      Uma segunda dúvida
      Como posso revolver o problema com as imagens do site?

       
      Agradeço desde já por toda e qualquer ajuda.
    • Por marcoshps11
      Neste tutorial, irei ensinar configurar o Docker no windows e rodar seu otserver
       
       
      - Diferença entre Docker x Máquina virtual:
        Docker e Máquinas Virtuais (VMs) ambas são fundamentais usadas para isolar recursos em um sistema de computação, mas funcionam de maneiras muito diferentes.
       
        VMs são ambientes de computação completos, incluindo um sistema operacional (SO) completo, que simulam o hardware de um computador físico. Isso significa que cada VM é um sistema autônomo e independente.   Já o Docker, usa a tecnologia de contêineres. Os contêineres compartilham o mesmo sistema operacional do host, mas mantêm seu próprio espaço de processo, arquivos e rede. Isso significa que eles são muito mais leves do que as VMs, pois não precisam de um SO completo, e podem ser iniciados e parados muito mais rapidamente.
      - Vantagens em utilizar o Docker
       O Docker oferece várias vantagens significativas:
      Eficiência de recursos: Como os contêineres Docker compartilham o SO do host, eles são mais leves e usam menos recursos do que as VMs. Portabilidade: O Docker permite que você "construa uma vez, execute em qualquer lugar". Uma vez criado um contêiner Docker, ele pode ser executado em qualquer sistema que suporte o Docker, independentemente das configurações subjacentes. Isolamento: Cada contêiner Docker é isolado do resto do sistema, o que ajuda a evitar conflitos entre diferentes aplicações e versões de software. Integração e entrega contínua: O Docker se integra bem com ferramentas de CI/CD (Integração Contínua / Entrega Contínua), permitindo a automatização de testes e implantação de aplicações. Escalabilidade e Orquestração: O Docker facilita a escalabilidade de aplicações, permitindo que múltiplos contêineres sejam implantados facilmente. Além disso, com ferramentas como Docker Swarm e Kubernetes, a orquestração de contêineres se torna eficiente e gerenciável  
       
      Colocando a mão na massa
       
      Este tutorial será dividido nas seguintes etapas:
      Preparação do Windows Instalando o Docker Instalando imagens mariadb e phpmyadmin Realizando a build da imagem TFS  
      1º PASSO:  Preparando o Windows com o subsistema Linux.
       
      AVISO: Essa Etapa será necessária somente caso ainda não possua o subsistema Linux ativado em seu windows
       
      Os comandos a seguir, serão todos utilizando o POWERSHELL do windows, na barra de pesquisa digite POWERSHELL e execute como administrador.
       

       
      Com o POWERSHELL aberto, execute os seguintes comandos:
       
      Habilitando subsistema Linux:
        dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart  
       
      Habilitando recurso de máquina virtual: dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart  
      Baixe e instale Kernel do Linux:  
      https://wslstorestorage.blob.core.windows.net/wslblob/wsl_update_x64.msi
       
      Após essa etapa, será necessário reiniciar o computador para atualização, após reiniciar, abra novamente o PowerShell
       
      Definindo o WSL 2 como padrão: wsl --set-default-version 2  
       
      Após esses passos, basta entrar na Microsoft Store e instalar o sistema Ubuntu:


       
      Após a instalação, abra o Ubuntu, como será a primeira vez, irá solicitar para que digite um nome de usuário e uma senha.

       
       
       
      Etapa 1 concluída.
       
      Fonte: https://learn.microsoft.com/pt-br/windows/wsl/install-manual
       
      2º PASSO:  Instalando Docker.
       
      este é um passo simples, apenas entre no site oficial do Docker, baixe e instale o Docker Desktop

      https://www.docker.com/
       

       
       
      Etapa 2 concluída.
       
       
      3º PASSO:  Instalando imagens MariaDB e phpMyAdmin
       
       Assim como no passo 1, execute novamente o PowerShell como administrador e siga os seguintes passos:
       
      Primeiro vamos baixar as imagens necessárias, execute os seguintes comandos: docker pull mariadb  
      docker pull phpmyadmin/phpmyadmin  
       
      Agora iremos criar uma "Rede" para que o docker se comunique entre os containers que iremos utilizar. Execute o seguinte comando:  
      docker network create mynetwork  
        mynetwork é o nome que defini neste caso, você pode utilizar o nome que achar melhor, porém lembre-se desse nome que iremos utilizar nos próximos passos.
       
      Agora iremos iniciar essas imagens, utilizando os seguintes comandos:  
      docker run --name mariadb --network=mynetwork -e MYSQL_ROOT_PASSWORD=your_password -d mariadb  
      your_password = altere pela senha que deseja utilizar no mysql
      mynetwork = é o nome que criamos no passo anterior
       
      docker run --name myadmin --network=mynetwork --link mariadb:db -d -p 8080:80 phpmyadmin/phpmyadmin  
      Lembrando novamente, mynetwork é o nome criado anteriormente
       
      Após esses passos, será possível ver seu container rodando no Docker Desktop:

       
      Etapa 3 concluída.
       
      4º PASSO:  Gerando Imagem do TFS e configurações necessárias:

       
      Baixe a TFS, nesse exemplo será o repositório oficial https://github.com/otland/forgottenserver Extraia os arquivos após baixar com o container mariadb e phpmyadmin rodando, acesse http://localhost:8080/  com o login root, e a senha que criou no passo 3, crie uma nova base de dados e importe o arquivo schema.sql do servidor edite o arquivo config.lua.dist
       -- MySQL
      mysqlHost = "mariadb"
      mysqlUser = "root"
      mysqlPass = "SUA SENHA CRIADO NO PASSO 3"
      mysqlDatabase = "NOME DA DATABASE"
      mysqlPort = 3306
      mysqlSock = ""

      mariadb é o nome do container que estamos rodando o mysql  
       
      ** Caso queira utilizar todo potencial do seu computador na hora de buildar a TFS, no arquivo Dockerfile, edite a linha 18:
      RUN cmake --preset default && cmake --build --config RelWithDebInfo --preset default para
       
      RUN cmake --preset default && cmake --build --config RelWithDebInfo --preset default -- -j 16  
      onde 16 é o numero de processadores lógicos que deseja ser utilizados, não é necessário utilizar 100% porém quanto mais melhor, porém caso utilize mais do que está disponível poderá travar,  então utilize a quantidade mostrada pra menos.
      no gerenciador de tarefas aba desempenho, é possível visualizar a quantidade de núcleos e processadores lógicos do seu CPU


       
      Após isso, entre no Power Shell e execute o comando:  
      docker build -t server .  
       onde "server" é o nome da imagem que será gerada
       
      Após isso, é só iniciar o servidor com o seguinte comando  
      docker run --name server --network=mynetwork -p 7171:7171 -p 7172:7172 -d server  
      lembrando que mynetwork é o nome que geramos no passo 3, e o ultimo parametro é nome da imagem que geramos anteriormente.
       
      Você poderá ver seu sevidor ronando no Docker Desktop:
       

       
      caso queira parar algum servidor ou iniciar novamente, é só clicar no botão de ação:
       

       
      Caso precise fazer alguma alteração no server, basta utilizar os comandos de build e run citados anteriormente.
       
       
       
       
      Lembrando que isso é um tutorial básico para rodar o servidor na máquina local, qualquer dúvida ou sugestão, deixe comentário.
       
    • Por becertified
      .Qual servidor ou website você utiliza como base? 
      Base PokeWish+PokeLight.
      Qual o motivo deste tópico? 
      Como resolver o problema de status? é sem estado e não pode ser adicionado ao otserverlist.
       
    • Por gprada
      .Qual servidor ou website você utiliza como base? 
      Canary 13.11
       
      Qual o motivo deste tópico? 
      Dificuldade em liberar portas
       
      Fala galera do Tibia King, bom dia!
       
      Estou tentando liberar as portas 7171, 7172 e 8080 para que outros usuários possam acessar através de um ip dinâmico configurado no No-IP.
       
      Quando eu pingo o IP dinâmico, percebo que ele aponta para o IP do meu PC corretamente. Porém, não consigo acessar nem o site nem o game através do IP dinâmico, só usando localhost.
       
      As configurações aplicadas tanto no firewall do Windows 10 como no modem da Vivo estão nas imagens em anexo. Alguém teria alguma ideia do que tô fazendo de errado?
       
      Valeu!


×
×
  • Criar Novo...

Informação Importante

Confirmação de Termo