Seller Bless?w [8.1]

Status
Zamknięty.

luki02006

Advanced User
Zarejestrowany
Dołączył
Maj 30, 2008
Posty
175
Liczba reakcji
14
W data/npc/scripts two?ymy plik o nazwie Blessing.lua i wklejamy to:

Kod:
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('Pa.')
          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)
      msg = string.lower(msg)

    if (msgcontains(msg, 'hi') and (focus == 0)) and getDistanceToCreature(cid) < 4 then
          selfSay('Witaj ' .. getCreatureName(cid) .. ' Sprzedaje "5 blesow" 1 kosztuje 10.000.')
          focus = cid
          talk_start = os.clock()

      elseif msgcontains(msg, 'hi') and (focus ~= cid) and getDistanceToCreature(cid) < 4 then
          selfSay('Przepraszam, ' .. getCreatureName(cid) .. '! ale rozmawiam z kims.')

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

    elseif msgcontains(msg, '5 Blesow') then
                 if pay(cid,10000) then
            selfSay('Dodalem Ci blessy.')
            doPlayerAddBlessing(cid, 5)
                 else 
            selfSay('Sorry, you do not have enough gold')
            bless_state = 0
        end
       end
end


function onCreatureChangeOutfit(creature)

end

function onThink()

if (os.clock() - talk_start) > 30 then
          if focus > 0 then
              selfSay('Nastepny Prosze')
          end
              focus = 0
      end
    if focus ~= 0 then
        if getDistanceToCreature(focus) > 5 then
            selfSay('Pa.')
            focus = 0
        end
    end
end



Teraz wchodzimy do data/npc i two?ymy plik o nazwie Banor the Blessed.xml i wklejamy to:


Kod:
<npc name="Banor the blessed" script="data/npc/scripts/blessings.lua" autowalk="25" floorchange="0" access="5" level="1" maglevel="1">
    <health now="150" max="150"/>
    <look type="129" head="114" body="119" legs="114" feet="114" corpse="2212"/>

<parameters>
<parameter key="message_greet" value="Hello |PLAYERNAME|. I sell the five blessings (10k each), for each just say first bless, second bless, etc..." />
</parameters>
</npc>
Macie :] Zycze milej zabawy :]
 
Ale sie wysili?e? w wielu otsach npc blessing juz jest my?l? ze skrypt niepotrzebny
 
racja racja ale niezauwarzyles ze na typu devland - evolution niema tych npc wiec sie zastanow co
piszesz pff
.. i nienabijaj postow newbie..
 
Off Topic: A w jeste?cie sam izbanowani xD

Topic: Mo?e si? gdzie? przyda daje 1/100 u mnie raczej nie ^^
 
Odp: [8.1][NPC] Seller Bless?w

Odp: [8.1][NPC] Seller Bless?w

u mnie tez na evolution nie mam NPC sprzedajacego blessy przyda sie thx
 
Odp: [8.1][NPC] Seller Bless?w

Odp: [8.1][NPC] Seller Bless?w

Skopiowane z jakiego? OTS, wi?c moja ocena to 3/10
 
Odp: [8.1][NPC] Seller Bless?w

Odp: [8.1][NPC] Seller Bless?w

Na pewno wielu servom si? przyda bo nie u wszystkich jest ten npc ;]
U mnie jest ale na pewno si? innym przyda ;p
6/10
Pozdrawiam,
Bartke.
 
Odp: [8.1][NPC] Seller Bless?w

Odp: [8.1][NPC] Seller Bless?w

W data/npc/scripts two?ymy plik o nazwie Blessing.lua i wklejamy to:

TO MOZE BYC LECZ:


Kod:
<npc name="Banor the blessed" script="data/npc/scripts/blessings.lua"

Blessing.lua dales w ccrpits,lecz
W npc trzeba zmienic na Blessing.lua   niemoze byc Blessings.lua   (drobny blad) :D

Pozdrawiam,
Adamsz
 
Odp: [8.1][NPC] Seller Bless?w

Odp: [8.1][NPC] Seller Bless?w

na wi?kszo?ci ots?w jest ju? taki npc nie wysili?e? si?... a jak na jakim? silniku nie ma tego npc to silnik jest troszk? ubogi;]
 
Odp: Seller Bless?w [8.1]

mi ten npc nie dzia?a niewiem czemu mam yourots silnik
 
Odp: Seller Bless?w [8.1]

mam takie pytanko, mog? si? dowiedzie? do czego jest ten bless npc i co do niego trzeba mowic??
 
Odp: Seller Bless?w [8.1]

Na Evolution By Sentil jest ju? seller bless?w ale mo?e si? przyda? na inne otsy ja w?a?nie wgra?em tego skrypta i ?miga mi na silniku Devland 8.10.

P.S
5/10
 
Odp: Seller Bless?w [8.1]

Kod:
          selfSay('Witaj ' .. getCreatureName(cid) .. ' Sprzedaje "5 blesow" 1 kosztuje 10.000.')
1 kosztuje 10k - wi?c 5 kosztuje 50k ale...
Kod:
                 if pay(cid,10000) then
            selfSay('Dodalem Ci blessy.')
            doPlayerAddBlessing(cid, 5)
I za te 10k dostajesz 5 bless?w -.-
Podsumowuj?c :
Zamiast 1 bless - 10k jest 5 bless'?w - 10k ;)
O ile si? nie myl? ofc. ;)
 
Odp: Seller Bless?w [8.1]

Po 1. wg tego co jest napisane w xml to plik w data/npc/script/ powninien by? podpisany blessings... no mo?e przeoczy?e? literke ;p
Po 2. z Tego co wida? npc selluje 5 blessow za 10k...
Po.3 wg mnie ten npc nie jest aktywny na polecenia gracza..
To moje uwagi.. mog? si? myyyli? :p
 
Odp: Seller Bless?w [8.1]

Jezu very, very, very tenx ch?opie dzi?ki za tego posta ,bardzo UU wkocu mam blessera (mam silnik devland) a wiec jednak ten npc sie przydaje.:up:
 
Odp: Seller Bless?w [8.1]

a ja mam pytanie czy da si? zrobic czar dla danych profesji np 1,4,5 ze jak zaznaczamy to daje blesa i efekt na zaznaczonym ? nie wszystkie lecz 1 i nastepny czar na 2 ?? lub moze w talcations plx o pomoc.
 
Status
Zamknięty.
Back
Do góry