Bonus System (Tylko tfs 0.3.6)

Status
Zamknięty.

Shadok

Advanced User
Zarejestrowany
Dołączył
Luty 26, 2010
Posty
381
Liczba reakcji
65
Zaczynam!
Do "Creaturescript.xml" Wklej to:
Kod:
<event type="outfit" name="Addons" event="script" value="outfits.lua"/>
Nastepnie do wejdz do folderu data/creaturescript/scripts/login.lua Do login lua wklej to:
Kod:
registerCreatureEvent(cid, "Addons")
I teraz stworz folder w data/creaturescript/script/outfits.lua i do outfits.lua wkelj to:
Kod:
local hunter = createConditionObject(CONDITION_ATTRIBUTES)
setConditionParam(hunter, CONDITION_PARAM_TICKS, -1)
setConditionParam(hunter, CONDITION_PARAM_SKILL_DISTANCE, 3)

local knight = createConditionObject(CONDITION_ATTRIBUTES)
setConditionParam(knight, CONDITION_PARAM_TICKS, -1)
setConditionParam(knight, CONDITION_PARAM_SKILL_SWORD, 3)

local mage = createConditionObject(CONDITION_ATTRIBUTES)
setConditionParam(mage, CONDITION_PARAM_TICKS, -1)
setConditionParam(mage, CONDITION_PARAM_STAT_MAGICLEVEL, 2)

local yalahar = createConditionObject(CONDITION_ATTRIBUTES)
setConditionParam(yalahar, CONDITION_PARAM_TICKS, -1)
setConditionParam(yalahar, CONDITION_PARAM_STAT_MAGICLEVEL, 2)

local barbarian = createConditionObject(CONDITION_ATTRIBUTES)
setConditionParam(barbarian, CONDITION_PARAM_TICKS, -1)
setConditionParam(barbarian, CONDITION_PARAM_SKILL_AXE, 3)

local norse = createConditionObject(CONDITION_ATTRIBUTES)
setConditionParam(norse, CONDITION_PARAM_TICKS, -1)
setConditionParam(norse, CONDITION_PARAM_SKILL_SHIELD, 2)

local nightmare = createConditionObject(CONDITION_ATTRIBUTES)
setConditionParam(norse, CONDITION_PARAM_TICKS, -1)
setConditionParam(norse, CONDITION_PARAM_SKILL_SHIELD, 3)

function onOutfit(cid, old, current)
        if(current.lookType == old.lookType) then
                return TRUE
        end
        
        --Citizen
        if(current.lookType == 128 and current.lookAddons == 3 or current.lookType == 136 and current.lookAddons == 3) then --Bonus on
                setCreatureMaxHealth(cid, getCreatureMaxHealth(cid) + 100)
                doCreatureAddHealth(cid, 100)
                doChangeSpeed(cid, 10)
        elseif(old.lookType == 128 and old.lookAddons == 3 or old.lookType == 136 and old.lookAddons == 3) then --Bonus off
                setCreatureMaxHealth(cid, getCreatureMaxHealth(cid) - 100)
                doCreatureAddHealth(cid, -100)
                doChangeSpeed(cid, -10) 
        end
        
        --Hunter
        if(current.lookType == 129 and current.lookAddons == 3 or current.lookType == 137 and current.lookAddons == 3) then --Bonus on
                doAddCondition(cid, hunter)
        elseif(old.lookType == 129 and old.lookAddons == 3 or old.lookType == 137 and old.lookAddons == 3) then --Bonus off
                doRemoveCondition(cid, CONDITION_ATTRIBUTES)
        end
        
        --Mage
        if(current.lookType == 130 and current.lookAddons == 3 or current.lookType == 138 and current.lookAddons == 3) then --Bonus on
                doAddCondition(cid, mage)
                setCreatureMaxMana(cid, getCreatureMaxMana(cid) + 200)
                doCreatureAddMana(cid, 200)
        elseif(old.lookType == 130 and old.lookAddons == 3 or old.lookType == 138 and old.lookAddons == 3) then --Bonus off
                doRemoveCondition(cid, CONDITION_ATTRIBUTES)
                setCreatureMaxMana(cid, getCreatureMaxMana(cid) - 200)
                doCreatureAddMana(cid, -200)
        end
        
        --Knight
        if(current.lookType == 131 and current.lookAddons == 3 or current.lookType == 139 and current.lookAddons == 3) then --Bonus on
                doAddCondition(cid, knight)
        elseif(old.lookType == 131 and old.lookAddons == 3 or old.lookType == 139 and old.lookAddons == 3) then --Bonus off
                doRemoveCondition(cid, CONDITION_ATTRIBUTES)
        end
        
        --Summoner
        if(current.lookType == 133 and current.lookAddons == 3 or current.lookType == 141 and current.lookAddons == 3) then --Bonus on
                doAddCondition(cid, mage)
                setCreatureMaxMana(cid, getCreatureMaxMana(cid) + 100)
                doCreatureAddMana(cid, 100)
        elseif(old.lookType == 133 and old.lookAddons == 3 or old.lookType == 141 and old.lookAddons == 3) then --Bonus off
                doRemoveCondition(cid, CONDITION_ATTRIBUTES)
                setCreatureMaxMana(cid, getCreatureMaxMana(cid) - 100)
                doCreatureAddMana(cid, -100)
        end
        
        --Warrior
        if(current.lookType == 134 and current.lookAddons == 3 or current.lookType == 142 and current.lookAddons == 3) then --Bonus on
                doAddCondition(cid, knight)
        elseif(old.lookType == 134 and old.lookAddons == 3 or old.lookType == 142 and old.lookAddons == 3) then --Bonus off
                doRemoveCondition(cid, CONDITION_ATTRIBUTES)
        end
        
        --Barbarian
        if(current.lookType == 143 and current.lookAddons == 3 or current.lookType == 147 and current.lookAddons == 3) then --Bonus on
                doAddCondition(cid, barbarian)
        elseif(old.lookType == 143 and old.lookAddons == 3 or old.lookType == 147 and old.lookAddons == 3) then --Bonus off
                doRemoveCondition(cid, CONDITION_ATTRIBUTES)
        end
        
        --Druid
        if(current.lookType == 144 and current.lookAddons == 3 or current.lookType == 148 and current.lookAddons == 3) then --Bonus on
                doAddCondition(cid, mage)
        elseif(old.lookType == 144 and old.lookAddons == 3 or old.lookType == 148 and old.lookAddons == 3) then --Bonus off
                doRemoveCondition(cid, CONDITION_ATTRIBUTES)
        end
        
        --Wizard
        if(current.lookType == 145 and current.lookAddons == 3 or current.lookType == 149 and current.lookAddons == 3) then --Bonus on
                doAddCondition(cid, mage)
                setCreatureMaxMana(cid, getCreatureMaxMana(cid) + 100)
                doCreatureAddMana(cid, 100)
                setCreatureMaxHealth(cid, getCreatureMaxHealth(cid) + 100)
                doCreatureAddHealth(cid, 100)
        elseif(old.lookType == 145 and old.lookAddons == 3 or old.lookType == 149 and old.lookAddons == 3) then --Bonus off
                doRemoveCondition(cid, CONDITION_ATTRIBUTES)
                setCreatureMaxMana(cid, getCreatureMaxMana(cid) - 100)
                doCreatureAddMana(cid, -100)
                setCreatureMaxHealth(cid, getCreatureMaxHealth(cid) - 100)
                doCreatureAddHealth(cid, -100)
        end
        
        --Oriental
        if(current.lookType == 146 and current.lookAddons == 3 or current.lookType == 150 and current.lookAddons == 3) then --Bonus on
                setCreatureMaxMana(cid, getCreatureMaxMana(cid) + 200)
                doCreatureAddMana(cid, 200)
                setCreatureMaxHealth(cid, getCreatureMaxHealth(cid) + 200)
                doCreatureAddHealth(cid, 200)
                doChangeSpeed(cid, 10)
        elseif(old.lookType == 146 and old.lookAddons == 3 or old.lookType == 150 and old.lookAddons == 3) then --Bonus off
                setCreatureMaxMana(cid, getCreatureMaxMana(cid) - 200)
                doCreatureAddMana(cid, -200)
                setCreatureMaxHealth(cid, getCreatureMaxHealth(cid) - 200)
                doCreatureAddHealth(cid, -200)
                doChangeSpeed(cid, -10)
        end
        
        --Assassin
        if(current.lookType == 152 and current.lookAddons == 3 or current.lookType == 156 and current.lookAddons == 3) then --Bonus on
                doAddCondition(cid, hunter)
                doChangeSpeed(cid, 20)
        elseif(old.lookType == 152 and old.lookAddons == 3 or old.lookType == 156 and old.lookAddons == 3) then --Bonus off
                doRemoveCondition(cid, CONDITION_ATTRIBUTES)
                doChangeSpeed(cid, -20)
        end
        
        --Shaman
        if(current.lookType == 154 and current.lookAddons == 3 or current.lookType == 158 and current.lookAddons == 3) then --Bonus on
                doAddCondition(cid, mage)
        elseif(old.lookType == 154 and old.lookAddons == 3 or old.lookType == 158 and old.lookAddons == 3) then --Bonus off
                doRemoveCondition(cid, CONDITION_ATTRIBUTES)
        end
        
        --Norse
        if(current.lookType == 251 and current.lookAddons == 3 or current.lookType == 252 and current.lookAddons == 3) then --Bonus on
                doAddCondition(cid, norse)
                setCreatureMaxHealth(cid, getCreatureMaxHealth(cid) + 200)
                doCreatureAddHealth(cid, 200)
        elseif(old.lookType == 251 and old.lookAddons == 3 or old.lookType == 252 and old.lookAddons == 3) then --Bonus off
                doRemoveCondition(cid, CONDITION_ATTRIBUTES)
                setCreatureMaxHealth(cid, getCreatureMaxHealth(cid) - 200)
                doCreatureAddHealth(cid, -200)
        end
        
        --Nightmare
        if(current.lookType == 268 and current.lookAddons == 3 or current.lookType == 269 and current.lookAddons == 3) then --Bonus on
                doAddCondition(cid, nightmare)
                setCreatureMaxHealth(cid, getCreatureMaxHealth(cid) + 100)
                doCreatureAddHealth(cid, 100)
        elseif(old.lookType == 268 and old.lookAddons == 3 or old.lookType == 269 and old.lookAddons == 3) then --Bonus off
                doRemoveCondition(cid, CONDITION_ATTRIBUTES)
                setCreatureMaxHealth(cid, getCreatureMaxHealth(cid) - 100)
                doCreatureAddHealth(cid, -100)
        end
        
        --Jester
        if(current.lookType == 270 and current.lookAddons == 3 or current.lookType == 273 and current.lookAddons == 3) then --Bonus on
                setCreatureMaxMana(cid, getCreatureMaxMana(cid) + 100)
                doCreatureAddMana(cid, 100)
                setCreatureMaxHealth(cid, getCreatureMaxHealth(cid) + 100)
                doCreatureAddHealth(cid, 100)
                doChangeSpeed(cid, 10)
        elseif(old.lookType == 270 and old.lookAddons == 3 or old.lookType == 273 and old.lookAddons == 3) then --Bonus off
                setCreatureMaxMana(cid, getCreatureMaxMana(cid) - 100)
                doCreatureAddMana(cid, -100)
                setCreatureMaxHealth(cid, getCreatureMaxHealth(cid) - 100)
                doCreatureAddHealth(cid, -100)
                doChangeSpeed(cid, -10)
        end
        
        --Brotherhood
        if(current.lookType == 278 and current.lookAddons == 3 or current.lookType == 279 and current.lookAddons == 3) then --Bonus on
                doAddCondition(cid, mage)
                setCreatureMaxHealth(cid, getCreatureMaxHealth(cid) + 200)
                doCreatureAddHealth(cid, 200)
        elseif(old.lookType == 278 and old.lookAddons == 3 or old.lookType == 279 and old.lookAddons == 3) then --Bonus off
                doRemoveCondition(cid, CONDITION_ATTRIBUTES)
                setCreatureMaxHealth(cid, getCreatureMaxHealth(cid) - 200)
                doCreatureAddHealth(cid, -200)
        end
        
        --Demonhunter
        if(current.lookType == 288 and current.lookAddons == 3 or current.lookType == 289 and current.lookAddons == 3) then --Bonus on
                setCreatureMaxMana(cid, getCreatureMaxMana(cid) + 500)
                doCreatureAddMana(cid, 500)
                setCreatureMaxHealth(cid, getCreatureMaxHealth(cid) + 500)
                doCreatureAddHealth(cid, 500)
                doChangeSpeed(cid, 20)
        elseif(old.lookType == 288 and old.lookAddons == 3 or old.lookType == 289 and old.lookAddons == 3) then --Bonus off
                setCreatureMaxMana(cid, getCreatureMaxMana(cid) - 500)
                doCreatureAddMana(cid, -500)
                setCreatureMaxHealth(cid, getCreatureMaxHealth(cid) - 500)
                doCreatureAddHealth(cid, -500)
                doChangeSpeed(cid, -20)
        end
        
        --Yalaharian
        if(current.lookType == 324 and current.lookAddons == 3 or current.lookType == 325 and current.lookAddons == 3) then --Bonus on
                setCreatureMaxMana(cid, getCreatureMaxMana(cid) + 200)
                doCreatureAddMana(cid, 200)
                setCreatureMaxHealth(cid, getCreatureMaxHealth(cid) + 200)
                doCreatureAddHealth(cid, 200)
                doAddCondition(cid, yalahar)
        elseif(old.lookType == 324 and old.lookAddons == 3 or old.lookType == 325 and old.lookAddons == 3) then --Bonus off
                setCreatureMaxMana(cid, getCreatureMaxMana(cid) - 200)
                doCreatureAddMana(cid, -200)
                setCreatureMaxHealth(cid, getCreatureMaxHealth(cid) - 200)
                doCreatureAddHealth(cid, -200)
                doRemoveCondition(cid, yalahar)
        end
        return TRUE
end

Skrypt polega na tym ze np. Ze jesli masz outfit full huntera dodaje ci 3 dista i tam chyba 50 many czy hp i takie rozne ;p
Mysle ze skrypt bardzo sie sprzyda

Regards
Shadok

Notka moderatorska:
Skrypt posiada b??d, o kt?rym wi?cej mo?na si? dowiedzie? w przedostatnim po?cie tematu. - Korzystanie z niego jest na w?asn? odpowiedzialno??.
 
Odp: Bonus System (Tylko tfs 0.3.6)

Witam, Dok?adnie dzia?anie skryptu :
Kod:
--[[
Citizen Outfit  5 speeda, 100hp
Hunter Outfit 3 dista
Knight Outfit  3 sworda
Mage Outfit  2 Mlvl 200many
Barbarian Outfit 3 axe
Druid Outfit  2Mlvl
Nobleman Outfit 3 cluba
Oriental Outfit 200hp 200many 5 speeda
Warrior Outfit 3 sworda
Wizard Outfit 1Mlvl 200many
Assassin Outfit 5 speeda 2 dista
Beggar Outfit 200hp 
Pirate Outfit 3 cluba 100hp
Shaman Outfit 2Mlvl
Norseman Outfit 200hp 2 shielda
Nightmare Outfit 3Shielda
Brothergood Outfit 2mlvl 100hp
Jester Outfit 5 speeda 100hp 100many
Demon Hunter 200hp 10speeda
Yalaharian Outfit 2mlvl 5 speeda
]]--

Taki system mo?na ?atwo omini? ;]
Proponowa? bym u?ucie innej funkcji "
PHP:
doAddCondition(cid, blablabla)

Pozdrawiam.

btw. CreatureEvent Addon "Bonus System"
Nie poda?e? Autora.
 
Odp: Bonus System (Tylko tfs 0.3.6)

@up
Akurat nie z otlanda bralem ;]
Tylko z innej malo popularnej strony i nie bylo napisane autora...
@topic
Sprzydaje sie do projektow rpg!!
Zapraszam :>
 
Odp: Bonus System (Tylko tfs 0.3.6)

Skrypt dobry, napisa?em podobny na FaniaOTS.pl d?ugo przed powstaniem tego.
Ale 10/10 za umiej?tno?? skorzystania z nowej funkcji :)

@Maniucza:
To co poda?e? tyczy si? tylko skryptu na fanii, ten daje co innego :P
 
Odp: Bonus System (Tylko tfs 0.3.6)

@up
Ty te skrypty pisa?e? na Fanie? Anty Bot, System bonus?w itp???

Skrypt bardzo fajny. Graty dla autora.
 
Odp: Bonus System (Tylko tfs 0.3.6)

Refresh
1. Wiadomo?? kt?r? wpisa?e? jest za kr?tka. Prosz? wyd?u?y? swoj? wypowied? do przynajmniej 15 znak?w.
 
Odp: Bonus System (Tylko tfs 0.3.6)

R e f r e s h
r e f r e s h
r e f r e s h
r e f r e s h
r e f r e s h
 
Odp: Bonus System (Tylko tfs 0.3.6)

Pewnie Warlon b?dzie mia? z tego skryptu po?ytek.Ten z Otlandu te? jest do?? dobry, wida? zgapiony od WypasOTS.

Pozdrawiam
 
Odp: Bonus System (Tylko tfs 0.3.6)

skrypt ciekawie zrobione - chocia? m?g?by? u?y? zamiast conditions normalnie funkcji add...
Ale to tw?j wyb?r - no mo?e ?e na odwr?t same conditions, bez funkcji add...

A ty to tak wymiesza?e? :(
 
Odp: Bonus System (Tylko tfs 0.3.6)

Skrypt fajny zainstalowalem na swoim ots i dziala bez zarzutow ..
Dzieki ci i oby wiecej takich skryptow
 
Odp: Bonus System (Tylko tfs 0.3.6)

o co chodzi ??
[16/04/2010 23:07:52] [Error - CreatureEvent::configureEvent] No valid type for creature event.outfit
[16/04/2010 23:07:52] [Warning - BaseEvents::loadFromXml] Cannot configure event
[16/04/2010 23:07:52] Reloaded creature events.
 
Odp: Bonus System (Tylko tfs 0.3.6)

@up
Jaki silnik uzywasz?
@topic
Refreszo xd
 
Odp: Bonus System (Tylko tfs 0.3.6)

@up
Warn dla niego ;<
@topic
REFREsH!
ReFreSH
RefREsh
HSErfer
 
Odp: Bonus System (Tylko tfs 0.3.6)

Skrypt jest super. Przy da si? na pewno i to jest fajne rozwi?zanie aby zach?ci? ludzi do grania na swoim ots'ie :)

pozdro
 
Odp: Bonus System (Tylko tfs 0.3.6)

Dzi?ki skrypt jest naprawd? super. lecz ja jednak proponuje zamian? niekt?rych bonus?w do poszczeg?lnych addonow

Na pewno wrzuc? do swojego ots

reput^^
 
Odp: Bonus System (Tylko tfs 0.3.6)

@up
To sam se to mozesz zmienic ;>
@topic
bump! refresz1!11!1 xD
 
Odp: Bonus System (Tylko tfs 0.3.6)

Jezeli znacie sie troche na skryptach to zuwazcie ze jest on zbugowany. Uzylem go u siebie na otsie a po kilku godzinach gracze mieli po 1000000 hp i many. Nie polecam, chyba ze wezmiecie tego z otlandu i na wlasna odpowiedzialnosc. Jakby ktos mial problem tak samo jak ja to: Zapytania kt?re przywracaj? poprawne warto?ci hp i many: (koniecznie w takiej kolejnosci i wszyscy musz? by? wylogowani)
update player set mana = (level*5) - 5, manamax = (level*5) - 5, health = (level*15)+65, healthmax = (level*15)+65 where vocation = 4 or vocation =8;
update players set mana = (level*15)-85, manamax = (level*15)-85, health= (level*10)+105, healthmax = (level*10)+105 where vocation = 3 or vocation =7;
update players set mana = (level*30)-205, manamax = (level*30)-205, health= (level*5)+145, healthmax= (level*5)+145
Pozdrawiam i radze uwazac co do uzytku tego dodatku.
 
Status
Zamknięty.
Back
Do góry