What's new

99xmanarune

Status
Not open for further replies.

Boltex

Advanced User
Joined
Jun 4, 2008
Messages
187
Reaction score
8
Witam mam na otsie wgrana dzi?aj?co manarunke.Jak robie j? Godem to mam ich 99 a jak chesz kupic ja u npc to mam tylko 1.Jak zrobic zeby npc sprzedawa? manarune z 99 strza?ow??
 

zioomek3

Active User
Joined
Dec 13, 2008
Messages
149
Reaction score
4
Odp: 99xmanarune

Jak masz w skrypcie tak? linijk?:
shopModule:addBuyableItem({'manarune'}, 2310, 80, 3, 'manarune')
2310-id itemka (czyli manaruny)
80-cena (w gp)
3-ilo?? urzy? (czyli tu dajesz np. 99)
 

Boltex

Advanced User
Joined
Jun 4, 2008
Messages
187
Reaction score
8
Odp: 99xmanarune

ale to wpisa? w npc? ja tego w npc nie mam ;/
 
Last edited:

Xart Irok

Senior User
Joined
Sep 7, 2008
Messages
2,925
Reaction score
419
Age
32
Odp: 99xmanarune

musisz podac liczbe ladnkow w items.xml tylko w odpowiedniej runie ktora podales w actions.xml
 

Boltex

Advanced User
Joined
Jun 4, 2008
Messages
187
Reaction score
8
Odp: 99xmanarune

to chyba nie tam bo tam pisze tylko w items.xml
Code:
	<item id="2270" article="a" name="spell rune">
		<attribute key="weight" value="120"/>

Kto? ma inne pomys?y??
 

Veliusek

Active User
Joined
Jul 31, 2008
Messages
124
Reaction score
7
Odp: 99xmanarune

Zr?b acces dla NPC taki jak dla GODa, i wtedy podczas kupywania niech npc wypowiada s?owa, kt?re normalnie m?wi?by gm, wtedy manaruny beda spada?y mu pod nogi, tak s?dz? XD
 

Boltex

Advanced User
Joined
Jun 4, 2008
Messages
187
Reaction score
8
Odp: 99xmanarune

jest 5 u GOda i 5 u NPC i nic nie daje czekam na dalsze propozycje xD
 

Xinx

Senior User
Joined
Jun 17, 2008
Messages
712
Reaction score
127
Age
31
Odp: 99xmanarune

Wejdz w data/npc/scripts/runes.lua i podaj to co tam pisze.
 

Boltex

Advanced User
Joined
Jun 4, 2008
Messages
187
Reaction score
8
Odp: 99xmanarune

podaje ca?e code

local focus = 0
local talk_start = 0
local target = 0
local following = false
local attacking = false

function onThingMove(creature, thing, oldpos, oldstackpos)

end


function onCreatureAppear(creature)

end


function onCreatureDisappear(cid, pos)
if focus == cid then
selfSay('Good bye then.')
focus = 0
talk_start = 0
end
end


function onCreatureTurn(creature)

end


function msgcontains(txt, str)
return (string.find(txt, str) and not string.find(txt, '(%w+)' .. str) and not string.find(txt, str .. '(%w+)'))
end


function onCreatureSay(cid, type, msg)
local msg = string.lower(msg)

if msgcontains(msg, 'hi') and focus == 0 and getDistanceToCreature(cid) < 4 then
selfSay('Hello ' .. creatureGetName(cid) .. '! I sell wands, rods, runes, bp rune, potions, bp potion.')
focus = cid
talk_start = os.clock()

elseif msgcontains(msg, 'hi') and focus ~= cid and getDistanceToCreature(cid) < 4 then
selfSay('Sorry, ' .. creatureGetName(cid) .. '! I talk to you in a minute.')

elseif focus == cid then
talk_start = os.clock()

if msgcontains(msg, 'runes') then
selfSay('I sell hmms (1000gps), uhs (3000gps), gfbs (1500gps), explosions (3500gps), sds (5000gps), manarune (8000gps), blank runes (10gps).')
elseif msgcontains(msg, 'wands') then
selfSay('I sell wand of inferno (15k), decay (5k), cosmic energy (10k), vortex (100gp) and dragonbreath (1000gp).')
elseif msgcontains(msg, 'rods') then
selfSay('I sell terra (10k), snakebite (100gp), hailstorm (15k), necrotic (5k) and moonlight rod (1000gp).')
elseif msgcontains(msg, 'bp rune') then
selfSay('I sell bp sds (80k), bp uhs (60k), bp hmms (20k), bp gfbs (30k), bp explosions (70k), bp magic walls (80k), bp blank (20gp), bp fire bombs (60k), bp destroy fields (10k).')
elseif msgcontains(msg, 'potions') then
selfSay('I mana potion (mp 50gp), strong mana potion (smp 100gp), great mana potion (gmp 200gp), health potion (hp 60gp), strong health potion (shp 110gp), great health potion (ghp 210gp).')
elseif msgcontains(msg, 'bp potion') then
selfSay('I sell bp mp (1k), bp smp (2k), bp gmp (4k), bp hp (1,2k), bp shp (2,2k), bp ghp (4,2k).')


elseif msgcontains(msg, 'bp mp') then
buyContainer(cid,2001,7620,1,1000)

elseif msgcontains(msg, 'bp smp') then
buyContainer(cid,2001,7589,1,2000)

elseif msgcontains(msg, 'bp gmp') then
buyContainer(cid,2001,7590,1,4000)

elseif msgcontains(msg, 'bp hp') then
buyContainer(cid,2000,7618,1,1200)

elseif msgcontains(msg, 'bp shp') then
buyContainer(cid,2000,7588,1,2200)

elseif msgcontains(msg, 'bp ghp') then
buyContainer(cid,2000,7591,1,4200)



elseif msgcontains(msg, 'hp') then
buy(cid,7618,getCount(msg),60)
elseif msgcontains(msg, 'shp') then
buy(cid,7588,getCount(msg),110)
elseif msgcontains(msg, 'ghp') then
buy(cid,7591,getCount(msg),210)


elseif msgcontains(msg, 'mp') then
buy(cid,7620,getCount(msg),50)
elseif msgcontains(msg, 'smp') then
buy(cid,7589,getCount(msg),100)
elseif msgcontains(msg, 'gmp') then
buy(cid,7590,getCount(msg),200)



elseif msgcontains(msg, 'inferno') then
buy(cid,2187,getCount(msg),15000)
elseif msgcontains(msg, 'decay') then
buy(cid,2188,getCount(msg),5000)
elseif msgcontains(msg, 'cosmic energy') then
buy(cid,2189,getCount(msg),10000)
elseif msgcontains(msg, 'vortex') then
buy(cid,2190,getCount(msg),100)
elseif msgcontains(msg, 'dragonbreath') then
buy(cid,2191,getCount(msg),1000)

elseif msgcontains(msg, 'terra') then
buy(cid,2181,getCount(msg),10000)
elseif msgcontains(msg, 'snakebite') then
buy(cid,2182,getCount(msg),100)
elseif msgcontains(msg, 'hailstorm') then
buy(cid,2183,getCount(msg),15000)
elseif msgcontains(msg, 'necrotic') then
buy(cid,2185,getCount(msg),5000)
elseif msgcontains(msg, 'moonlight') then
buy(cid,2186,getCount(msg),1000)


elseif msgcontains(msg, 'hmm') then
buy(cid,2311,getCount(msg),1000)
elseif msgcontains(msg, 'gfb') then
buy(cid,2304,getCount(msg),1500)
elseif msgcontains(msg, 'explo') then
buy(cid,2313,getCount(msg),3500)
elseif msgcontains(msg, 'uh') then
buy(cid,2273,getCount(msg),3000)
elseif msgcontains(msg, 'sd') then
buy(cid,2268,getCount(msg),5000)
elseif msgcontains(msg, 'blank') then
buy(cid,2260,getCount(msg),1)
elseif msgcontains(msg, 'manarune') then
buy(cid,2270,getCount(msg),8000)




elseif msgcontains(msg, 'bp sds') then
buyContainer(cid,2003,2268,100,80000)

elseif msgcontains(msg, 'bp hmms') then
buyContainer(cid,2001,2311,100,20000)

elseif msgcontains(msg, 'bp uhs') then
buyContainer(cid,2002,2273,100,60000)

elseif msgcontains(msg, 'bp gfbs') then
buyContainer(cid,2000,2304,100,30000)

elseif msgcontains(msg, 'bp explosions') then
buyContainer(cid,2001,2313,100,70000)

elseif msgcontains(msg, 'bp blank') then
buyContainer(cid,1988,2260,1,20)

elseif msgcontains(msg, 'bp magic walls') then
buyContainer(cid,1999,2293,100,80000)

elseif msgcontains(msg, 'bp fire bombs') then
buyContainer(cid,2000,2305,100,60000)

elseif msgcontains(msg, 'bp destroy fields') then
buyContainer(cid,2003,2261,100,10000)


elseif string.find(msg, '(%a*)bye(%a*)') and getDistanceToCreature(cid) < 4 then
selfSay('Good bye, ' .. creatureGetName(cid) .. '!')
focus = 0
talk_start = 0
end
end
end

function onCreatureChangeOutfit(creature)

end


function onThink()
if (os.clock() - talk_start) > 30 then
if focus > 0 then
selfSay('Next Please...')
end

focus = 0
end

if focus ~= 0 then
if getDistanceToCreature(focus) > 5 then
selfSay('Good bye then.')
focus = 0
end
end

end
 

Xinx

Senior User
Joined
Jun 17, 2008
Messages
712
Reaction score
127
Age
31
Odp: 99xmanarune

Skasuj tamto co masz przy manarunie i wklej to:
Code:
                elseif msgcontains(msg, '100 manarune') then
                        buy(cid,2270,100,1)

Pozdrawiam,
Xinx.

@down

elseif msgcontains(msg, 'manarune') then
buy(cid,2270,getCount(msg),8000)
 
Last edited:

Boltex

Advanced User
Joined
Jun 4, 2008
Messages
187
Reaction score
8
Odp: 99xmanarune

ale co mam skasowac?

up@
THX ZIOMEK REPUCIK
 
Last edited:
Status
Not open for further replies.
Top