What's new

pokemony Online Skrypt

Status
Not open for further replies.

damian22qq

Advanced User
Joined
Nov 11, 2009
Messages
161
Reaction score
5
Witam Nie wiem Czy Mo?na Pisa? tu o pokemonach ale mam pro?be je?li kto? zna takiego skrypta ?e Npc Np Przepuszcza Gracza Jak Zap?aci No Np 1,5k
bo widzia?em no ots ?e Pisze si? Safari ten npc 1.5k ty yes i cie tepnol tam dalej je?li kto? by umia? to zrobi? to daje Za to +REP Bardzo bym Prosi?
 

ErMex

Egzekucja
Joined
Dec 1, 2010
Messages
574
Reaction score
181
Odp: pokemony Online Skrypt

W data/npc/ utw?rz skrypt o nazwie Ermex.xml i dodaj do niego:
Code:
<?xml version="1.0" encoding="UTF-8"?>
<npc name="Ermex" script="data/npc/scripts/TP/saffari.lua" walkinterval="2000" floorchange="0">
    <health now="100" max="100"/>
    <look type="129" head="19" body="69" legs="107" feet="50" addons="0"/>
    <parameters>
        <parameter key="message_greet" value="Czesc |PLAYERNAME|. Moge zaprac Cie na Saffari."/>
        <parameter key="message_farewell" value="Zegnam. Zapraszam ponownie."/>
    </parameters>
</npc>
Nast?pnie wejd? w data/npc/scripts/tp/ i utw?rz plik saffari.lua a nast?pnie dodaj do niego:
Code:
local keywordHandler = KeywordHandler:new()
        local npcHandler = NpcHandler:new(keywordHandler)
        NpcSystem.parseParameters(npcHandler)
        
        
        
        -- OTServ event handling functions start
        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
        -- OTServ event handling functions end
        
        
        -- Don't forget npcHandler = npcHandler in the parameters. It is required for all StdModule functions!
local travelNode = keywordHandler:addKeyword({'saffari'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Przejscie do Saffari bedzie kosztowac 1,5k Czy chcesz sie tam udac?'})
	travelNode:addChildKeyword({'yes'}, StdModule.travel, {npcHandler = npcHandler, level = 1, cost = 1500, destination = {[COLOR="Red"]x=1019, y=1055, z=7[/COLOR]} })
	travelNode:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = true, text = 'Next time maybe.'})
	      
        keywordHandler:addKeyword({'travel'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'I can travel you all places'})
        -- Makes sure the npc reacts when you say hi, bye etc.
        npcHandler:addModule(FocusModule:new())
Na czerwono zaznaczy?em pozycje gdzie ma teleportowa? ( zmie? je ).

Pozdrawiam,
ErMex
 
Status
Not open for further replies.
Top