No więc na początek napisze do czego NPC służy. Sprzedaje on Itemki potrzebne do robienia addonów. Do data/NPC/script robimy default.lua i wklejamy:
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 npcHandler:addModule(FocusModule:new())
Następnie do data/NPC dodajemy Claire.xml i wklejamy to:
<?xml version="1.0" encoding="UTF-8"?> <npc name="Claire" script="data/npc/scripts/default.lua" walkinterval="2000" floorchange="0"> <health now="150" max="150"/> <look type="138" head="114" body="12" legs="90" feet="115" addons="1" corpse="2212"/> <parameters> <parameter key="module_shop" value="1"/> <parameter key="message_greet" value="Hello |PLAYERNAME|. Sprzedaje item potrzebne do zrobienia addon! Napisz {Trade} zeby zobaczyc oferte."/>"/> <parameter key="shop_buyable" value="minotaur leather,5878,1000;chicken feather,5890,1000;honeycomb,5902,1000;lizard leather,5876,1000;red dragon leather,5948,1000;Enchanted Chicken Wing,5891,3000;pice of royal steel,5887,100000; pice of drakonian steel,5889,100000;pice of hell steel,5888,100000;elane's crossbow,5947,100000;iron ore,5880,1000;Huge Chunk of Crude Iron,5892,100000;Behemoth Fang,5893,1000;Damaged Steel Helmet,5924,100000;Warrior's Sweat,5885,100000; piece of royal steel,5887,100000;Magic Sulphur,5904,5000;ankh,6561,3000;Soul Stone,5809,100000;Fighting Spirit,5884,100000;Red Piece of Cloth,5911,1000;green piece of cloth,5910,1000;Spool of yarn,5886,100000;Bear Paw,5896,2000; Wolf Paw,5897;Demon Dust,5906,3000;ceiron's wolf tooth chain,5940,100000;waterhose,5938,100000;Mermaid Comb,5945,100000;Ape Fur,5883,1000;fish fin,5895,1000;Blue Piece of Cloth,5912,1000;Bat Wing,5894,2000;Holy Orchid,5922.2500; Lizard Scale,5881,1500;Red Dragon Scale,5882;3000;Vampire Dust,5905,2000;Hardened Bone,5925,1000;Turtle Shell,5899,1000;Dragon Claw,5919,100000;Brown Piece of Cloth,5913,2000;Yellow Piece of Cloth,5914,2000;White Piece of Cloth,5909,2000; Behemoth Claw,5930,100000;Nose Ring,5804,100000;Simon the Beggar's Favorite Staff,6107,100000;Eye Patch,6098,1000;Hook,6097,1000;Peg Leg,6126,1000;Ron the Ripper's Sabre,6101,100000;Deadeye Devious' eye patch,6102,100000; Lethal Lissy's Shirt,6100,100000;Brutus Bloodbeard's Hat,6099,100000;Voodoo Doll,3955,50000;Mandrake,5015,1000000;Banana Staff,3966,50000;Tribal Mask,3967,50000;shard,7290,50000;demonic essence,6500,1000"/> </parameters> </npc>
Daje SS żeby pokazać jak to wygląda:
Screen http://img407.imageshack.us/i/claire2.png/
|