• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!
  • 2026 staff recruitment is open! Check it out and consider applying!

Pomożcie ze skryptem

Kamikaz

New Member
Joined
Nov 4, 2010
Messages
112
Reaction score
0
Location
Poland
Witam.

Mam skrypt na Malowanie Balli, ale nie wiem dlaczego nie działa. Malować maluje ale kiedy chcem wyciągnąć pokemona nie da się oto skrypty

Paint.xml:
Code:
<?xml version="1.0" encoding="UTF-8"?>
<npc name="Jack" walkinterval="35000000" script="paint.lua" floorchange="0" speed="90">
	<health now="150" max="150"/>
	<look type="158" head="91" body="102" legs="83" feet="0"/>
	<parameters>
	    <parameter key="message_greet" value="Welcome, i can {pintar} Poke Balls."/>
	    <parameter key="message_farewell" value="Bye! Please check back often."/>
	    <parameter key="message_idletimeout" value="Next ..."/>
	    <parameter key="message_walkaway" value="Come back whenever you want!"/>
	</parameters>
</npc>

Oraz paint.lua

Code:
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

function pintar(cid, message, keywords, parameters, node)
if(not npcHandler:isFocused(cid)) then
return false
end
	if isInArray({2220;2222;2651;2653;2655;11624;11621;11627;11618}, getPlayerSlotItem(cid, CONST_SLOT_FEET).itemid) then
		if(doPlayerRemoveMoney(cid, parameters.price)) then
			local feet = getPlayerSlotItem(cid, CONST_SLOT_FEET)
			local maxh = tonumber(getItemAttribute(feet.uid, "poke"):match("/(.+)]"))
			doItemSetAttribute(feet.uid, "poke", getItemAttribute(feet.uid, "poke"):sub(1, findLetter(getItemAttribute(feet.uid, "poke"), "[")) .. maxh .. getItemAttribute(feet.uid, "poke"):sub(findLetter(getItemAttribute(feet.uid, "poke"), "/")))
			doTransformItem(feet.uid, parameters.bola)
			selfSay('Bola Pintada!')
		else
			selfSay('Vocę năo tem dinheiro suficiente!')
		end
	else
		selfSay('Coloque a pokebola correta no slot!')
	end
npcHandler:resetNpc()
return true
end
local frase = 'Deseja pintar sua pokebola para'
local node1 = keywordHandler:addKeyword({'paint'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Eu faço as sequintes pinturas:\n-> pokeball: 10$\n->great ball: 25$\n->super ball: 100$\n->ultra ball: 150$\n->saffari ball: 150$\n->golden ball, fresh ball, dark ball e love ball: 200$'})
local node11 = node1:addChildKeyword({'pokeball'},StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = frase..' pokeball?'})
	node11:addChildKeyword({'yes'}, pintar, {price = 5000,bola = 2222})
	node11:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Ok, then.', reset = true})
local node12 = node1:addChildKeyword({'great ball'},StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = frase..' great ball?'})
	node12:addChildKeyword({'yes'}, pintar, {price = 5000,bola = 2651})
	node12:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Ok, then.', reset = true})
local node13 = node1:addChildKeyword({'super ball'},StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = frase..' super ball?'})
	node13:addChildKeyword({'yes'}, pintar, {price = 5000,bola = 2653})
	node13:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Ok, then.', reset = true})
local node14 = node1:addChildKeyword({'ultra ball'},StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = frase..' ultra ball?'})
	node14:addChildKeyword({'yes'}, pintar, {price = 5000,bola = 2220})
	node14:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Ok, then.', reset = true})
local node15 = node1:addChildKeyword({'saffari ball'},StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = frase..' saffari ball?'})
	node15:addChildKeyword({'yes'}, pintar, {price = 5000,bola = 2655})
	node15:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Ok, then.', reset = true})
local node16 = node1:addChildKeyword({'golden ball'},StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = frase..' golden ball?'})
	node16:addChildKeyword({'yes'}, pintar, {price = 5000,bola = 11624})
	node16:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Ok, then.', reset = true})
local node17 = node1:addChildKeyword({'fresh ball'},StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = frase..' fresh ball?'})
	node17:addChildKeyword({'yes'}, pintar, {price = 5000,bola = 11627})
	node17:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Ok, then.', reset = true})
local node18 = node1:addChildKeyword({'dark ball'},StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = frase..' dark ball?'})
	node18:addChildKeyword({'yes'}, pintar, {price = 5000,bola = 11618})
	node18:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Ok, then.', reset = true})
local node19 = node1:addChildKeyword({'love ball'},StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = frase..' love ball?'})
	node19:addChildKeyword({'yes'}, pintar, {price = 5000,bola = 11621})
	node19:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Ok, then.', reset = true})

npcHandler:addModule(FocusModule:new())

Proszę o szybką pomoc.
 
Kto wie co na to poradzić, to z Instalacji Gesior ACC:

Code:
1. MySQL server is not running on host.
2. MySQL user, password, database or host isn't configured in: F:/Serwer Pokemon/Pokemon Black&White/config.lua .
3. MySQL user, password, database or host is wrong.
 
Kto wie co na to poradzić, to z Instalacji Gesior ACC:

Code:
1. MySQL server is not running on host.
2. MySQL user, password, database or host isn't configured in: F:/Serwer Pokemon/Pokemon Black&White/config.lua .
3. MySQL user, password, database or host is wrong.

Musisz usunąć wszystkie pliki z acc i od nowa wgrać bo się z błędami skopiowały ;)
 
Po pierwsze zacznij edytować skrypty, a nie walisz jeden pod drugim w odstępie blisku 5 godzin...

Co do skryptu, masz jakiś błąd w konsoli?
 
Dzięki wielkie. Miałem jakiś błąd w bazie danych. Usunąłem całą i wgrałem od początku i Działa. Wielkie dzięki za pomoc
 
Back
Top