What's new

-Średni Poradniki Ots (Dzie?a Zebrane) Zgromadzone by Haalwa

Haalwa

Advanced User
Joined
Jul 5, 2008
Messages
201
Reaction score
8
Przepraszam ale niestety b?d? musia? tutaj double postowa?

Witam, tak wi?c zastanawiaj?c si? postanowi?em zrobi? taki du?y temat gdzie b?d? znajdowa?y si? przydatne poradniki. Zaczynamy Oczywi?cie :D

Tutaj opisz? Vocations.xml - opis funkcji.

UWAGA - Przerobi? tylko 1 profesj? - we wszystkich innych s? te same funkcje

<vocation id="1" name="Sorcerer" description="a Sorcerer" gaincap="10" gainhp="5" gainmana="30" gainhpticks="6" gainhpamount="5" gainmanaticks="3" gainmanaamount="5" gainsoulticks="3600" gainsoulamount="1" maxsoul="100" manamultiplier="1.1" attackspeed="1000" prevoc="1" basespeed="220">
<diepercent experience="8" magic="8" skill="8" equipment="8" container="100"/>
<formula damage="1.2" defense="1.1" armor="1.1"/>
<skill id="0" multiplier="1.5"/>
<skill id="1" multiplier="2.0"/>
<skill id="2" multiplier="2.0"/>
<skill id="3" multiplier="2.0"/>
<skill id="4" multiplier="2.0"/>
<skill id="5" multiplier="1.5"/>
<skill id="6" multiplier="1.1"/>
vocation id="1" - ID profesji - nie zmieniajcie ;]
name="Sorcerer" - nazwa profesji
description="a Sorcerer" - opis profesji (You see bla. He is a Sorcerer
gaincap="10" gainhp="5" gainmana="30" - ile capu, hp, many dostaje co level.
gainhpamount="5" gainmanaamount="5" - ile hp i many odnawia.
maxsoul="100" - maksimum punkt?w soul
manamultiplier="1.1" - ile razy szybciej leci magic level
attackspeed="1000" - szybko?c ataku - 1000=1 sekunda
basespeed="220" - pocz?tkowa szybkosc chodzenia
<diepercent experience="8" magic="8" skill="8" equipment="8" container="100"/> - ile procent EXPa, magic levelu, skilla traci, ile ma procent na strat? EQ, baga/backpacka.
<formula damage="1.2" defense="1.1" armor="1.1"/>
<skill id="0" multiplier="1.5"/>
<skill id="1" multiplier="2.0"/>
<skill id="2" multiplier="2.0"/>
<skill id="3" multiplier="2.0"/>
<skill id="4" multiplier="2.0"/>
<skill id="5" multiplier="1.5"/>
<skill id="6" multiplier="1.1"/>


- Mno?niki - razy ile leci jaki skill (kolejnosc jak w kliencie).

Have Fun :)

Wszystkie funkcje LUA w najnowszych SVN!* AUTOR: Killavus

Zacznijmy od rzeczy definitywnej - w najnowszych SVN nie ma rozr??nienia na funkcj? dla NPC?w, Actions, Movements, Talkactions itp... wszystkie funkcje s? dost?pne dla wszystkich skrypt?w.

W poni?szym spisie pragn? om?wi? wszystkie funkcje LUA, kt?re mo?esz zastosowa? w swoich skryptach.

Funkcje podstawowe spisz? tutaj:

Code:
Actionscript:
function onUse(cid, item, frompos, item2, topos)
Movement:
function onStepIn(cid, item, pos)
function onStepOut(cid, item, pos)
function onEquip(cid, item, slot)
function onDeEquip(cid, item, slot)
function onAddItem(moveitem, tileitem, pos)
function onRemoveItem(moveitem, tileitem, pos)
Weapons:
function onUseWeapon(cid, var)
Spells:
function onTargetCreature(cid, target)
function onCastSpell(cid, var)
function onUse(cid, item, frompos, item2, topos) – funkcja wyzwalana przy u?yciu przedmiotu. Wywo?ywana z argumentami: cid (w?a?ciwie to uid, ale cid to ten, kt?ry u?y? przedmiot, wi?c b?dzie najcz??ciej u?ywany), item (przedmiot, kt?ry jest u?ywany. Aby go wywo?a? pos?ugujemy si? komend? item.uid), frompos (pozycja, z jakiej zosta? u?yty przedmiot.), item2 (przedmiot, na kt?rym u?ywamy przedmiotu... wiem, ?e to zawile brzmi. Wywo?uje si? to komend? item2.uid) oraz topos (pozycja na kt?rej zosta? u?yty przedmiot).
Funkcje z udzia?em tej funkcji zapisujemy w data/actions/scripts. Deklarujemy je w actions.xml.

Przyk?ady deklaracji:

Code:
<action itemid="przyk?adowy item" script="przyk?ad.lua" />
<action uniqueid="przyk?adowe UID" script="przyk?ad.lua" />
<action actionid="przyk?adowe AID" script="przyk?ad.lua" />
Function onStepIn(cid, item, pos) – funkcja wyzwalana przy wej?ciu na dan? tile (przedmiot). Wywo?ywana z argumentami cid, item, pos (je?eli nie wiesz, co to za argumenty, sp?jrz do opisu onUse... pos to pozycja, na kt?r? wszed? gracz). Takowe skrypty zapisujemy do data/movements/scripts. Deklarujemy je w movements.xml.

Przyk?ady deklaracji:
Code:
<movevent event="StepIn" itemid="Item" script="przyk?ad.lua" />
<movevent event="StepIn" uniqueid="UID" script="przyk?ad.lua" />
<movevent event="StepIn" actionid="AID" script="przyk?ad.lua" />
Przyk?ad skryptu:
Code:
function onStepIn(cid, item, pos)

	if(pos.x == 200) and (pos.y == 200) and (pos.z == 7) then
  doPlayerSendTextMessage(cid, 19, “Ha! Stoje na tile o X: 200, Y: 200 i Z:200!”
	end
return 1
end
function onStepOut(cid, item, pos) – funkcja odwrotna do onStepIn. Deklaruje si? j? w tym samym miejscu. Uruchamia si?, gdy gracz ZEJDZIE z danego pola.

Przyk?ady deklaracji:
Code:
<movevent event="StepOut" itemid="Item" script="przyk?ad.lua" />
<movevent event="StepOut" actionid="AID" script="przyk?ad.lua" />
<movevent event="StepOut" uniqueid="UID" script="przyk?ad.lua" />
Przyk?ad skryptu:
Code:
function onStepOut(cid, item, pos)
	if(item.uid ~= 8000) then
  doPlayerSendTextMessage(cid, 19, “O nie! Ta tile nie mia?a uniqueid 8000;(“)
	end
return 1
end
function onEquip(cid, item, slot) – funkcja wyzwalana przy equipie (“za?o?eniu na siebie”) danego itemu. Deklaruje si? j? w tym samym miejsciu co onStepIn oraz onStepOut. R?wnie? w tym samym miejscu si? j? zapisuje. Wywo?ywana z argumentami cid, item, slot (tutaj tylko slot jest nowy – jest to miejsce, gdzie item jest wsadzony...)

Przyk?ady deklaracji:
Code:
<movevent event="Equip" itemid="Item ID" slot="miejsce" script=”przyk?ad.lua” />
<movevent event="Equip" actionid="AID" slot="miejsce" script=”przyk?ad.lua” />
<movevent event="Equip" uniqueid="UID" slot="miejsce" script=”przyk?ad.lua” />
Przyk?ad skryptu:
Code:
function onEquip(cid, item, slot)
 if(slot ~= 1) then
doPlayerSendTextMessage(cid, 19, “Mysle, ze helm lepiej zalozyc na glowe.”)
 end
return 1
end
function onDeEquip(cid, item, slot) – funkcja odwrotna do onEquip. Deklaruje si? j? w tym samym miejsciu co onStepIn oraz onStepOut. R?wnie? w tym samym miejscu si? j? zapisuje. Wywo?ywana z argumentami cid, item, slot.

Przyk?ady deklaracji:
Code:
<movevent event="DeEquip" itemid="Item ID" slot="miejsce" script=”przyk?ad.lua” />
<movevent event="DeEquip" actionid="AID" slot="miejsce" script=”przyk?ad.lua” />
<movevent event="DeEquip" uniqueid="UID" slot="miejsce" script=”przyk?ad.lua” />
Przyk?ad skryptu:
Code:
function onDeEquip(cid, item, slot)
if(item.itemid == 2195) and (slot == 8) then
 doPlayerSendTextMessage(cid, 19, “Zdjalem moje drogocenne BoHy :(“)
end
 return 1
end
UWAGA! W deklaracji poda?em tajemnicze “miejsce”... mianowicie, wpisuje si? tam:
Code:
head – g?owa
necklace – naszyjnik (amulet)
backpack – no... tam gdzie si? trzyma plecak :P (plecy)
armor – zbroja
right-hand – prawa r?ka
left-hand – lewa r?ka
legs – nogawice
feet – buty
ring – pier?cie?
function onAddItem(moveitem, tileitem, pos) – funkcja wyzwalana przy stworzeniu przedmiotu na danym przedmiocie, gdzie moveitem to ten przedmiot (tworzony), tileitem to przedmiot, na kt?rym ten przedmiot jest tworzony. Zapisuje si? tam gdzie inne movement funkcje.

Przyk?ady deklaracji:
Code:
<movevent event="AddItem" tileitem="Item ID" itemid="Item ID" script=”przyk?ad.lua”/>
<movevent event="AddItem" tileitem="Item ID" actionid="AID"  script=”przyk?ad.lua”/>
<movevent event="AddItem" tileitem="Item ID" uniqueid="UID" script=”przyk?ad.lua”/>
Przyk?ad skryptu:
Code:
function onAddItem(moveitem, tileitem, pos)
if(tileitem ~= 101) then
 doTransformItem(tileitem.uid, 101)
end
return 1
end
function onRemoveItem(moveitem, tileitem, pos) – funkcja odwrotna od onAddItem. Argumenty te same, zapisywanie to same.

Przyk?ady deklaracji:
Code:
<movevent event="RemoveItem" tileitem="Item ID" itemid="Item ID" script=”przyk?ad.lua”/>
<movevent event="RemoveItem" tileitem="Item ID" actionid="AID"  script=”przyk?ad.lua”/>
<movevent event=”RemoveItem" tileitem="Item ID" uniqueid="UID" script=”przyk?ad.lua”/>
Przyk?ad skryptu:
Code:
function onRemoveItem(moveitem, tileitem, pos)
if(tileitem == 101) then
 doTransformItem(tileitem.uid, math.random(101, 6000)
end
return 1
end
function onUseWeapon(cid, var) – Funkcja wywo?ywana przy u?yciu broni (ataku). Argumenty s? jasne, var nie jest dla nas istotne . Skrypty z t? funkcj? zapisuje si? do data/weapons/scripts, a deklaruje w weapons.xml

Przyk?ady deklaracji:
Code:
<wand id="ID Wanda" range="Zasi?g” enabled="1" exhaustion="Powoduje wyczerpanie?" script="przyk?ad.lua"></wand>
<distance id="ID Itemu" range="Zasi?g” ammo="Usuwa? czy przesuwa? na pozycj? ataku (jak speary?) (move albo removecount)" enabled="1" script="przyk?ad.lua"></distance>
Przyk?ad skryptu:
Code:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_BLOCKARMOR, 1)
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_POISONDAMAGE)
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_POISONARROW)
setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, -0.1, -30, -0.2, 0)

local condition = createConditionObject(CONDITION_POISON)
setConditionParam(condition, CONDITION_PARAM_DELAYED, 1)
addDamageCondition(condition, 10, 2000, -10)
setCombatCondition(combat, condition)

function onUseWeapon(cid, var)
	return doCombat(cid, combat, var)
end
function onTargetCreature(cid, target) – Funkcja wywo?ywana na “trafionej creature”. Cid to kreatura, kt?ra rzuca spell, a target to nasz cel. Skrypty z t? funkcj? zapisuje si? do data/spells/scripts. Deklaruje si? je w actions.xml. UWAGA! Ten skrypt jest “stale zespolony” z funkcj? onCastSpell!
function onCastSpell(cid, var) – zespolona z onTargetCreature.

Przyk?ady deklaracji:
Code:
<rune name="Nazwa Runy" id="ID Runy" charges="Liczba ?adunk?w" needtarget="Potrzebuje celu?" lvl="Lvl wymagany do u?ycia" maglv="Mlvl wymagany do u?ycia" mana="mana potrzebna do u?ycia" soul=”soule potrzebne do u?ycia" exhaustion="powoduje wyczerpanie?" prem="dla Premium? (nie dzia?a.)" enabled="1" allowfaruse="1" script="przyk?ad.lua"></rune>

<instant name=”Nazwa spella" words="S?owa, kt?re nale?y wypowiedzie?" direction="Potrzebuje kierunku gracza?" blocktype="co blokuje ten spell?" lvl="wymagany lvl" maglv="wymagany mlvl" mana="wymagana mana" soul="wymagane soule" exhaustion="powoduje wyczerpanie?" prem="dla Premium? (nie dzia?a.)" enabled="1" script="przyk?ad.lua">
<vocation name="nazwa profesji."/>
</instant>
Przyk?ad skryptu:
Code:
local ArrayRopeSpot = {384, 418}

function onCastSpell(cid, var)
	local pos = getPlayerPosition(cid)
	pos.stackpos = 0
	local grounditem = getThingfromPos(pos)

	if(isInArray(ArrayRopeSpot, grounditem.itemid) == TRUE) then
		local newpos = pos
		newpos.y = newpos.y + 1
		newpos.z = newpos.z - 1
		doTeleportThing(cid, newpos)
		doSendMagicEffect(pos, CONST_ME_ENERGYAREA)
		return LUA_NO_ERROR
	else
		doPlayerSendDefaultCancel(cid, RETURNVALUE_NOTPOSSIBLE)
		doSendMagicEffect(pos, CONST_ME_POFF)
		return LUA_ERROR
	end	
end
To wszystko. Przejd?my do polece?:
 
Last edited:

Haalwa

Advanced User
Joined
Jul 5, 2008
Messages
201
Reaction score
8
Witam, tak wi?c zastanawiaj?c si? postanowi?em zrobi? taki du?y temat gdzie b?d? znajdowa?y si? przydatne poradniki. Zaczynamy Oczywi?cie :D

Tutaj opisz? Vocations.xml - opis funkcji.

UWAGA - Przerobi? tylko 1 profesj? - we wszystkich innych s? te same funkcje

<vocation id="1" name="Sorcerer" description="a Sorcerer" gaincap="10" gainhp="5" gainmana="30" gainhpticks="6" gainhpamount="5" gainmanaticks="3" gainmanaamount="5" gainsoulticks="3600" gainsoulamount="1" maxsoul="100" manamultiplier="1.1" attackspeed="1000" prevoc="1" basespeed="220">
<diepercent experience="8" magic="8" skill="8" equipment="8" container="100"/>
<formula damage="1.2" defense="1.1" armor="1.1"/>
<skill id="0" multiplier="1.5"/>
<skill id="1" multiplier="2.0"/>
<skill id="2" multiplier="2.0"/>
<skill id="3" multiplier="2.0"/>
<skill id="4" multiplier="2.0"/>
<skill id="5" multiplier="1.5"/>
<skill id="6" multiplier="1.1"/>
vocation id="1" - ID profesji - nie zmieniajcie ;]
name="Sorcerer" - nazwa profesji
description="a Sorcerer" - opis profesji (You see bla. He is a Sorcerer
gaincap="10" gainhp="5" gainmana="30" - ile capu, hp, many dostaje co level.
gainhpamount="5" gainmanaamount="5" - ile hp i many odnawia.
maxsoul="100" - maksimum punkt?w soul
manamultiplier="1.1" - ile razy szybciej leci magic level
attackspeed="1000" - szybko?c ataku - 1000=1 sekunda
basespeed="220" - pocz?tkowa szybkosc chodzenia
<diepercent experience="8" magic="8" skill="8" equipment="8" container="100"/> - ile procent EXPa, magic levelu, skilla traci, ile ma procent na strat? EQ, baga/backpacka.
<formula damage="1.2" defense="1.1" armor="1.1"/>
<skill id="0" multiplier="1.5"/>
<skill id="1" multiplier="2.0"/>
<skill id="2" multiplier="2.0"/>
<skill id="3" multiplier="2.0"/>
<skill id="4" multiplier="2.0"/>
<skill id="5" multiplier="1.5"/>
<skill id="6" multiplier="1.1"/>


- Mno?niki - razy ile leci jaki skill (kolejnosc jak w kliencie).

Have Fun :)

Wszystkie funkcje LUA w najnowszych SVN!* AUTOR: Killavus

Zacznijmy od rzeczy definitywnej - w najnowszych SVN nie ma rozr??nienia na funkcj? dla NPC?w, Actions, Movements, Talkactions itp... wszystkie funkcje s? dost?pne dla wszystkich skrypt?w.

W poni?szym spisie pragn? om?wi? wszystkie funkcje LUA, kt?re mo?esz zastosowa? w swoich skryptach.

Funkcje podstawowe spisz? tutaj:

Code:
Actionscript:
function onUse(cid, item, frompos, item2, topos)
Movement:
function onStepIn(cid, item, pos)
function onStepOut(cid, item, pos)
function onEquip(cid, item, slot)
function onDeEquip(cid, item, slot)
function onAddItem(moveitem, tileitem, pos)
function onRemoveItem(moveitem, tileitem, pos)
Weapons:
function onUseWeapon(cid, var)
Spells:
function onTargetCreature(cid, target)
function onCastSpell(cid, var)
function onUse(cid, item, frompos, item2, topos) – funkcja wyzwalana przy u?yciu przedmiotu. Wywo?ywana z argumentami: cid (w?a?ciwie to uid, ale cid to ten, kt?ry u?y? przedmiot, wi?c b?dzie najcz??ciej u?ywany), item (przedmiot, kt?ry jest u?ywany. Aby go wywo?a? pos?ugujemy si? komend? item.uid), frompos (pozycja, z jakiej zosta? u?yty przedmiot.), item2 (przedmiot, na kt?rym u?ywamy przedmiotu... wiem, ?e to zawile brzmi. Wywo?uje si? to komend? item2.uid) oraz topos (pozycja na kt?rej zosta? u?yty przedmiot).
Funkcje z udzia?em tej funkcji zapisujemy w data/actions/scripts. Deklarujemy je w actions.xml.

Przyk?ady deklaracji:

Code:
<action itemid="przyk?adowy item" script="przyk?ad.lua" />
<action uniqueid="przyk?adowe UID" script="przyk?ad.lua" />
<action actionid="przyk?adowe AID" script="przyk?ad.lua" />
Function onStepIn(cid, item, pos) – funkcja wyzwalana przy wej?ciu na dan? tile (przedmiot). Wywo?ywana z argumentami cid, item, pos (je?eli nie wiesz, co to za argumenty, sp?jrz do opisu onUse... pos to pozycja, na kt?r? wszed? gracz). Takowe skrypty zapisujemy do data/movements/scripts. Deklarujemy je w movements.xml.

Przyk?ady deklaracji:
Code:
<movevent event="StepIn" itemid="Item" script="przyk?ad.lua" />
<movevent event="StepIn" uniqueid="UID" script="przyk?ad.lua" />
<movevent event="StepIn" actionid="AID" script="przyk?ad.lua" />
Przyk?ad skryptu:
Code:
function onStepIn(cid, item, pos)

	if(pos.x == 200) and (pos.y == 200) and (pos.z == 7) then
  doPlayerSendTextMessage(cid, 19, “Ha! Stoje na tile o X: 200, Y: 200 i Z:200!”
	end
return 1
end
function onStepOut(cid, item, pos) – funkcja odwrotna do onStepIn. Deklaruje si? j? w tym samym miejscu. Uruchamia si?, gdy gracz ZEJDZIE z danego pola.

Przyk?ady deklaracji:
Code:
<movevent event="StepOut" itemid="Item" script="przyk?ad.lua" />
<movevent event="StepOut" actionid="AID" script="przyk?ad.lua" />
<movevent event="StepOut" uniqueid="UID" script="przyk?ad.lua" />
Przyk?ad skryptu:
Code:
function onStepOut(cid, item, pos)
	if(item.uid ~= 8000) then
  doPlayerSendTextMessage(cid, 19, “O nie! Ta tile nie mia?a uniqueid 8000;(“)
	end
return 1
end
function onEquip(cid, item, slot) – funkcja wyzwalana przy equipie (“za?o?eniu na siebie”) danego itemu. Deklaruje si? j? w tym samym miejsciu co onStepIn oraz onStepOut. R?wnie? w tym samym miejscu si? j? zapisuje. Wywo?ywana z argumentami cid, item, slot (tutaj tylko slot jest nowy – jest to miejsce, gdzie item jest wsadzony...)

Przyk?ady deklaracji:
Code:
<movevent event="Equip" itemid="Item ID" slot="miejsce" script=”przyk?ad.lua” />
<movevent event="Equip" actionid="AID" slot="miejsce" script=”przyk?ad.lua” />
<movevent event="Equip" uniqueid="UID" slot="miejsce" script=”przyk?ad.lua” />
Przyk?ad skryptu:
Code:
function onEquip(cid, item, slot)
 if(slot ~= 1) then
doPlayerSendTextMessage(cid, 19, “Mysle, ze helm lepiej zalozyc na glowe.”)
 end
return 1
end
function onDeEquip(cid, item, slot) – funkcja odwrotna do onEquip. Deklaruje si? j? w tym samym miejsciu co onStepIn oraz onStepOut. R?wnie? w tym samym miejscu si? j? zapisuje. Wywo?ywana z argumentami cid, item, slot.

Przyk?ady deklaracji:
Code:
<movevent event="DeEquip" itemid="Item ID" slot="miejsce" script=”przyk?ad.lua” />
<movevent event="DeEquip" actionid="AID" slot="miejsce" script=”przyk?ad.lua” />
<movevent event="DeEquip" uniqueid="UID" slot="miejsce" script=”przyk?ad.lua” />
Przyk?ad skryptu:
Code:
function onDeEquip(cid, item, slot)
if(item.itemid == 2195) and (slot == 8) then
 doPlayerSendTextMessage(cid, 19, “Zdjalem moje drogocenne BoHy :(“)
end
 return 1
end
UWAGA! W deklaracji poda?em tajemnicze “miejsce”... mianowicie, wpisuje si? tam:
Code:
head – g?owa
necklace – naszyjnik (amulet)
backpack – no... tam gdzie si? trzyma plecak :P (plecy)
armor – zbroja
right-hand – prawa r?ka
left-hand – lewa r?ka
legs – nogawice
feet – buty
ring – pier?cie?
function onAddItem(moveitem, tileitem, pos) – funkcja wyzwalana przy stworzeniu przedmiotu na danym przedmiocie, gdzie moveitem to ten przedmiot (tworzony), tileitem to przedmiot, na kt?rym ten przedmiot jest tworzony. Zapisuje si? tam gdzie inne movement funkcje.

Przyk?ady deklaracji:
Code:
<movevent event="AddItem" tileitem="Item ID" itemid="Item ID" script=”przyk?ad.lua”/>
<movevent event="AddItem" tileitem="Item ID" actionid="AID"  script=”przyk?ad.lua”/>
<movevent event="AddItem" tileitem="Item ID" uniqueid="UID" script=”przyk?ad.lua”/>
Przyk?ad skryptu:
Code:
function onAddItem(moveitem, tileitem, pos)
if(tileitem ~= 101) then
 doTransformItem(tileitem.uid, 101)
end
return 1
end
function onRemoveItem(moveitem, tileitem, pos) – funkcja odwrotna od onAddItem. Argumenty te same, zapisywanie to same.

Przyk?ady deklaracji:
Code:
<movevent event="RemoveItem" tileitem="Item ID" itemid="Item ID" script=”przyk?ad.lua”/>
<movevent event="RemoveItem" tileitem="Item ID" actionid="AID"  script=”przyk?ad.lua”/>
<movevent event=”RemoveItem" tileitem="Item ID" uniqueid="UID" script=”przyk?ad.lua”/>
Przyk?ad skryptu:
Code:
function onRemoveItem(moveitem, tileitem, pos)
if(tileitem == 101) then
 doTransformItem(tileitem.uid, math.random(101, 6000)
end
return 1
end
function onUseWeapon(cid, var) – Funkcja wywo?ywana przy u?yciu broni (ataku). Argumenty s? jasne, var nie jest dla nas istotne . Skrypty z t? funkcj? zapisuje si? do data/weapons/scripts, a deklaruje w weapons.xml

Przyk?ady deklaracji:
Code:
<wand id="ID Wanda" range="Zasi?g” enabled="1" exhaustion="Powoduje wyczerpanie?" script="przyk?ad.lua"></wand>
<distance id="ID Itemu" range="Zasi?g” ammo="Usuwa? czy przesuwa? na pozycj? ataku (jak speary?) (move albo removecount)" enabled="1" script="przyk?ad.lua"></distance>
Przyk?ad skryptu:
Code:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_BLOCKARMOR, 1)
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_POISONDAMAGE)
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_POISONARROW)
setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, -0.1, -30, -0.2, 0)

local condition = createConditionObject(CONDITION_POISON)
setConditionParam(condition, CONDITION_PARAM_DELAYED, 1)
addDamageCondition(condition, 10, 2000, -10)
setCombatCondition(combat, condition)

function onUseWeapon(cid, var)
	return doCombat(cid, combat, var)
end
function onTargetCreature(cid, target) – Funkcja wywo?ywana na “trafionej creature”. Cid to kreatura, kt?ra rzuca spell, a target to nasz cel. Skrypty z t? funkcj? zapisuje si? do data/spells/scripts. Deklaruje si? je w actions.xml. UWAGA! Ten skrypt jest “stale zespolony” z funkcj? onCastSpell!
function onCastSpell(cid, var) – zespolona z onTargetCreature.

Przyk?ady deklaracji:
Code:
<rune name="Nazwa Runy" id="ID Runy" charges="Liczba ?adunk?w" needtarget="Potrzebuje celu?" lvl="Lvl wymagany do u?ycia" maglv="Mlvl wymagany do u?ycia" mana="mana potrzebna do u?ycia" soul=”soule potrzebne do u?ycia" exhaustion="powoduje wyczerpanie?" prem="dla Premium? (nie dzia?a.)" enabled="1" allowfaruse="1" script="przyk?ad.lua"></rune>

<instant name=”Nazwa spella" words="S?owa, kt?re nale?y wypowiedzie?" direction="Potrzebuje kierunku gracza?" blocktype="co blokuje ten spell?" lvl="wymagany lvl" maglv="wymagany mlvl" mana="wymagana mana" soul="wymagane soule" exhaustion="powoduje wyczerpanie?" prem="dla Premium? (nie dzia?a.)" enabled="1" script="przyk?ad.lua">
<vocation name="nazwa profesji."/>
</instant>
Przyk?ad skryptu:
Code:
local ArrayRopeSpot = {384, 418}

function onCastSpell(cid, var)
	local pos = getPlayerPosition(cid)
	pos.stackpos = 0
	local grounditem = getThingfromPos(pos)

	if(isInArray(ArrayRopeSpot, grounditem.itemid) == TRUE) then
		local newpos = pos
		newpos.y = newpos.y + 1
		newpos.z = newpos.z - 1
		doTeleportThing(cid, newpos)
		doSendMagicEffect(pos, CONST_ME_ENERGYAREA)
		return LUA_NO_ERROR
	else
		doPlayerSendDefaultCancel(cid, RETURNVALUE_NOTPOSSIBLE)
		doSendMagicEffect(pos, CONST_ME_POFF)
		return LUA_ERROR
	end	
end
To wszystko. Przejd?my do polece?:
 

Haalwa

Advanced User
Joined
Jul 5, 2008
Messages
201
Reaction score
8
W tym tutorialu pokarz? jak stworzy? poprawny i przede wszystkim dzia?aj?cy restarter OTS

Tworzymy nowy plik np: notatnika i zapisujemy go jako restarter.bat lub pod inn? nazw? z rozserzeniem .bat (np: reset.bat itp.)

Wpisujemy kod:

Code:
echo off
title OTServer Restarter
color 80
cls
echo :::::::::::::::::::::::::::::::::::::::::::::::::::
echo ::             OTServer Restart             ::
echo :::::::::::::::::::::::::::::::::::::::::::::::::::

:controllerini
neverland.exe -- zamie? nazw? na nazw? .exe twojego serwera
echo :::::::::::::::::::::::::::::::::::::::::::::::::::
echo ::         Your OTServer is restarting...        ::
echo :::::::::::::::::::::::::::::::::::::::::::::::::::
goto :controllerini

Wy??czenie wiadomo?ci z b??dami:
Start >> Panel sterowania >> System
W w?a?ciwo?ciach systemu kliknij zaawansowane (zak?adka). Wtedy z listy wybierz przycisk co? jak "Error Reporting" lub reportowanie b??d?w (Co? w tym stylu). Kliknij na niego.
Kliknij "Wy??cz reportowanie b??d?w" ("Diable error reporting"), i odznacz "Lecz powiadom mnie o krytycznych b??dach" ("But notify me when critical errors occur")

Screen:

Teraz je?li tw?j serwer zcrashuje, nie musisz naciska? "Nie wysy?aj powiadomienia" - wszystko zrobi si? automatycznie.

Jest to prostsza metoda od us?ug systemu windows.
 
Last edited:

Haalwa

Advanced User
Joined
Jul 5, 2008
Messages
201
Reaction score
8
Instalowanie OTServa jako us?ugi Windowsa, Bardzo przydatny poradnik dla hoster?w.

W tym tutorialu poka?emy jak zainstalowa? Open Tibia Server jako us?ug? systemu Windows, co oznacza:
1. Brak okna polece? na pulpicie.
2. Automatyczny restart po crashu, wtedy mo?esz robi? inn? akcj?.


Wi?c, zaczynamy!
1. Potrzebujesz Windows Resource Kit Tools, zwany inaczej "rktools", mo?emy ?ci?gn?? z tej strony:

komputer, je?li nie przy zapytaniu do plik?w: srvany.exe i instsrv.exer, musisz napisa? pe?n? ?cie?k?, co? podobnego jak: %Program Files%\Windows Resource Kit\Tools\
Nast?pni ....

2. Otwieramy okno polece? windowsa: Start -> Uruchom, wpisz "cmd" i kliknij OK, lub naci?nij Enter. W linni polece? commandera wpisz

Code:
instsrv "OTServ" "C:\Program Files\Windows Resource Kits\Tools\srvany.exe"

Je?eli wszystko dobrze zrobi?e? powiniene? otrzyma?:

Code:
The service was successfuly added!

Je?eli tego nie otrzyma?e? gdzie? pope?ni?e? b??d.

3. Teraz otwieramy rejestr systemu, wi?c: Start -> Uruchom, wtedy wpisz "regedit" i kliknik OK, lub naci?nij Enter.
Otwieramy klucz: HKEY_LOCAL_MACHINE\System\CurrentControlSet\Servic es\OTServ
a. Klikamy prawym na OTServ i w okienki klikamy: next->key. Wpisujemy jako "name" (nazw?)

Code:
Parameters

b. Klikamy prawym przyciskiem myszy na Parameters i klikamy: new -> string. Wpisujemy jako nazw?

Code:
Application

c. Klikamy prawym przyciskiem myszy na Application, klikamy Modify i jako warto?? wpisujemy:

Code:
C:\?cie?ka do twojego serwera gdziekolwiek on jest\otserv.exe

Gdzie oczywi?cie jest to dok?adna ?cie?ka do serwera. Zamykamy edytor rejestru.

4. Teraz otwieramy us?ugi windowsa: Start -> run, wpisujemy "services.msc", klikamy Ok, lub naciskamy enter.
Przegl?damy w poszukiwaniu OTServ, klikamy prawym przyciskiem myszy na w?a?ciwo?ci (Properties).

5. W nowym oknie, nazwanym "OTServ Server properties", musisz zmieni? warto?? Startup (uruchomienie przy starcie) na "Automatic" (Automatycznie), je?eli chcesz aby tw?j serwer startowa? zawsze przy uruchomieniu systemu.
St?d mo?esz startowa? oraz zatrzymywa? serwer, nie u?ywaj wstrzymania (Pause) poniewa? w tym wypadku i tak nie dzia?a.

Otw?rz teraz "Recovery" (Zak?adka przywr??) i zaznacz akcj? - je?eli serwer zcrashuje wtedy sekund? p??niej lub w innym czasie uruchomi si? ponownie. Taki autorestart w lepszym wydaniu wink.gif Mo?esz ustawi? parametry wed?ug w?asnej woli - po restarcie, przed etc.

Mo?esz startowa? serwer r?cznie: Start -> Run i wpisa?

Code:
net start otserv

Lub zatrzyma?

Code:
net stop otserv

Mo?esz to samo zrobi? tworz?c plik bat (np: start.bat)
@echo off
echo Starting OTServ
net start otserv
echo Done.

stop.bat:
Code:
@echo off
echo Stopping OTServ
net stop otserv
echo Done.

Hura.
 
Last edited:

Haalwa

Advanced User
Joined
Jul 5, 2008
Messages
201
Reaction score
8
Co zrobi? aby tw?j OTS by? popularny ?
Jak wiesz ca?y czas wychodz? nowe silniki , jeden jest lepszy od drugiego dlatego wymagania graczy rosn?. Chc? przewa?nie mie? dobr? zabaw? , ma?ym wysi?kiem . Nie musisz mie? od razu ??cza 10mb i p?yt? g??wn? z dwoma procesorami aby na twoim serwerze mi?o i przyjemnie by?o mo?na sp?dza? czas w ok. 25 os?b wystarczy Ci internet 128 kb.
Dobrze podam tobie par? warunk?w jakie powiniene? spe?ni? aby tw?j „?wiat” nabra? „przybyszy”

- Serwer nie musi by? 24/7 ale 10 godzin dziennie na obecne czasy to niestety minimum .

- Map? , zr?b w?asn? albo niech Ci pomo?e kolega kt?ry ma do tego smyka?k? . Graczy odstrasza wielokrotnie powtarzanie si? mapy. Pami?taj o zdrowym ros?dku ! dok?adniej chodzi o spawny , np. g?upio je?eli gracz zabijaj?c minotaury nagle napotka teleport wchodz?c po chwili ginie przez dziesi?? orshabaali.

- Staraj si? pisa? czytelnie i bez b??d?w ortograficznych je?eli je pope?niasz w nadmiarze , gracze pomy?l? ?e ich po prostu nie szanujesz. ( A tak chyba nie jest , prawda? . Daj ka?demu r?wne szanse , nie rozdawaj rzeczy za darmo czy te? dlatego ?e kto? jest twoim koleg? .

- Parametry serwera to temat na kt?rym jest najwi?cej dyskusji , oczywi?cie to od ciebie zale?y jak sobie opcje poustawiasz lecz mam nadzieje ?e przemy?lisz to co Ci teraz przeka?e. Cz??? graczy lubi exp. 3x (zdecydowana mniejszo??) reszta 10000exp . Dlatego b?dziesz musia? znale?? co? po?redniego , mo?e 5-10x? Decyduj sam ! ale pami?taj aby reszta umiej?tno?ci ros?a normalnie z poziomem , poniewa? czasem wychodzi g?upia sytuacja je?eli zdob?dziemy naszym rycerzem ju? osiemdziesi?ty poziom a nasz poziom magii nie przekroczy? 4 .

- Wyka? si? profesjonalizmem i poka? ?e jeste? w pe?ni ?wiadomy tego co robisz , za??? zautomatyzowany spos?b zak?adania kont bo gg to nie najlepszy pomys?.

Autor: Reflex
Edycja i Korekta: Aciek
 

Haalwa

Advanced User
Joined
Jul 5, 2008
Messages
201
Reaction score
8
Funkcje get

getPlayerFood(uid) – Pobiera food stat gracza i zapisuje go w jako liczby.
getPlayerHealth(uid) - Pobiera aktualn? ilo?? ?ycia gracza i zapisuje j? jako liczby.
getPlayerMana(uid) – to samo tylko ?e mana
getPlayerLevel(uid) – Pobiera level gracza i zapisuje go jako liczby.
getPlayerMagLevel(uid) - Pobiera magic level gracza i zapisuje go jako liczby.
getPlayerName(uid) - Pobiera nazw? gracza i zapisuje j? jako stringu.
getPlayerAccess(uid) – Pobiera access gracza i zapisuje go jako liczby.
getPlayerPosition(uid) – Pobiera pozycj? gracza i zapisuje j? jako w TABLICY trzech element?w: x, y, z.
getPlayerItemCount(uid,itemid) – Pobiera ilo?? item?w o danym ID, jakie posiada gracz i zapisuje t? liczb?. “itemid” to w?a?nie ID tych item?w.
getPlayerSoul(uid) – Pobiera ilo?? souli gracza i zapisuje je w postaci liczby.
getPlayerFreeCap(uid) – Pobiera ilo?? wolnego jeszcze capa playera.
getPlayerLight(uid) – Pobiera ilo?? ?wiat?a, kt?re “wydziela” player.
getPlayerSlotItem(uid, slot) – Pobiera przedmiot z danego slotu gracza i zwraca jego itemid.
getPlayerDepotItems(uid, depotid) – Pobiera ilo?? przedmiot?w, kt?re znajduj? si? w depocie gracza.
getPlayerGuildId(uid) – Pobiera GuildID (numer gildii) gracza.
getPlayerGuildName(uid) – Pobiera nazw? gildii gracza.
getPlayerGuildRank(uid) – Pobiera rang? w gildii gracza.
getPlayerGuildNick(uid) – Pobiera tytu? w gildii gracza.
getPlayerStorageValue(uid,valueid) – Pobiera storagevalue o valueid i zapisuje t? liczb?.
getGlobalStorageValue(valueid) – Pobiera globalvalue i zapisuje t? liczb?.
getTilePzInfo(pos) – Sprawdza, czy tile o danej pozycji jest PZ, czy nie. Je?eli nie, zwraca 0. W przeciwnym wypadku zwraca 1.
getTileHouseInfo(pos) - Sprawdza, czy tile o danej pozycji nale?y do domku, czy nie. Je?eli nie, zwraca 0. W przeciwnym wypadku zwraca houseID tego domku.
getItemRWInfo(uid) – Sprawdza, czy na przedmiocie mo?na pisa? czy nie.
getThingfromPos(pos) – Pobiera rzecz z danej pozycji.
getThing(uid) – Pobiera rzecz o danym UID.
getThingPos(uid) – Pobiera pozycj? rzeczy o danym UID.

Funkcje do

doRemoveItem(uid,n) – Usuwa n item?w o danym UID.
doPlayerFeed(uid,food) – Dodaje +food do food statusu rzeczy o danym UID. doPlayerSendCancel(uid,text) – Przerywa wczytywanie skryptu i wysy?a wiadomo?? do playera.
doPlayerSendDefaultCancel(uid, ReturnValue) - Przerywa wczytywanie skryptu i wysy?a domy?lnie zdefiniowan? wiadomo?? do playera.
doTeleportThing(uid,newpos) – Teleportuje rzecz o danym UID do newpos.
doTransformItem(uid,toitemid) – Przemienia przedmiot o danym UID na przedmiot o ID r?wnym toitemid.
doPlayerSay(uid,text,type) – Sprawia, ?e gracz co? m?wi. (type to wpisa? tre?? wiadomo??i)
doSendMagicEffect(position,type) – Wysy?a animowany efekt na dan? pozycj?.
doChangeTypeItem(uid,new_type) – Zmienia item.type przedmiotu na inny.
doSetItemActionId(uid,actionid) – Zmienia actionid przedmiotu o danym UID.
doSetItemText(uid,text) – Zmienia zapisany tekst na przedmiocie o danym UID.
doSetItemSpecialDescription(uid,desc) – Dodaje specjalny opis przedmiotowi o danym UID.
doSendAnimatedText(position,text,color) – Wysy?a animowany text na dan? pozycje.
doPlayerAddSkillTry(uid,skillid,n) – Dodaje ilo?? “pr?b” do zdobycia skilla graczowi o danym UID.
doPlayerAddHealth(uid,health) – Dodaje “health” ?ycia graczowi o danym UID.
doCreatureAddHealth(uid,health) – Dodaje “health” ?ycia KREATURZE doPlayerAddMana(uid,mana) – Dodaje “mana” many graczowi o danym UID.
doPlayerAddSoul(uid,soul) – To samo tylko, ?e soule zamiast many.
doPlayerAddItem(uid,itemid,count or type) – dodaje item graczowi o danym UID. “count” to ilo??
doPlayerSendTextMessage(uid,MessageClasses,message ) – Wysy?a wiadomo?? tekstow? danemu graczowi. MessageClasses to typ wiadomo?ci.
doPlayerRemoveMoney(uid,money) – Usuwa “money” ilo?ci pieni?dzy graczowi o danym uid.
doShowTextWindow(cid,maxlen,canWrite) – wy?wietla okienko tekstowe graczowi o danym UID. Maxlen to ilo?? znak?w, jakie gracz mo?e wpisa?, a canWrite to czy mo?e pisa?, czy nie.
doDecayItem(uid) – Niszczy co? np. - item lub powoduje rozk?ad cia?a.
doCreateItem(itemid,type or count,position) – Tworzy item na danej pozycji. (dzia?a tylko na ziemi)
doSummonCreature(name, position) – Przywo?uje “dzik?” kreatur? (gdzie name wpisa? nazw? potwora).
doMoveCreature(uid, direction) – Przesuwa kreatur? o danym UID o 1 pole w danym kierunku.
doPlayerSetMasterPos(uid,pos) – Zmienia pozycj? temple gracza o danym UID.
doPlayerSetVocation(uid,voc) – Zmienia profesj? gracza o danym UID.
doPlayerRemoveItem(uid,itemid,count) – Usuwa “count” przedmiot?w od gracza o danym UID.
doPlayerAddExp(uid,exp) – Dodaje exp'a graczowi.
doPlayerSetGuildRank(uid, rank) – Zmienia rang? w gildii gracza o danym UID.
doPlayerSetGuildNick(uid, nick) – Zmienia tytu? w gildii gracza o danym uid.
doPlayerAddOutfit(uid,looktype,addons) – Dodaje outfit o looktype r?wnym “looktype” i z addonami r?wnymi “addons” graczowi o danym UID.
doPlayerRemOutfit(uid,looktype,addons) – to samo tylko, ?e usuwa .
doSetCreatureLight(uid, lightLevel, lightColor, time) – Zmienia poziom ?wiat?a o kolorze “lightColor” kreaturze o danym UID na czas r?wny “time”.

Funkcje is

isPlayer(uid) – Sprawdza, czy rzecz o danym UID to player. Je?eli tak, zwraca 1, je?eli nie, zwraca -1.
isContainer(uid) – Sprawdza, czy rzecz o danym UID to kontener. Je?eli tak, zwraca 1, je?eli nie, zwraca -1.
isMoveable(uid) - Sprawdza, czy rzecz o danym UID da si? przesun??. Je?eli tak, zwraca 1, je?eli nie, zwraca -1.

przyk?ad -
Cytat:
if isPlayer(cid) ~= -1 then


Dost?pna jest tak?e wersja angielska i? skrypter powinien zna? dobrze angielski -
 

Haalwa

Advanced User
Joined
Jul 5, 2008
Messages
201
Reaction score
8
Functions get

getPlayerFood(uid) -- Returns the food ticks of player
getPlayerHealth(uid) -- Returns the player's health
getPlayerMana(uid) -- Returns the player's mana
getPlayerLevel(uid) -- Returns the player's level
getPlayerMagLevel(uid) -- Returns the player's magic level
getPlayerName(uid) -- Returns the player's name
getPlayerAccess(uid) -- Returns the player's access
getPlayerPosition(uid) -- Returns the player's position
getPlayerSkill(uid,skillid) -- Returns the player's skill level of a skill
getPlayerMasterPos(cid) -- Returns the player's temple position
getPlayerTown(cid) -- Returns the player's town-id
getPlayerVocation(cid) -- Returns the player's vocation
getPlayerItemCount(cid,itemid) -- Returns the amount of an item that the player has
getPlayerSoul(cid) -- Returns the player's soul
getPlayerFreeCap(cid) -- Returns the player's free capacity
getPlayerLight(cid) -- Returns the player's light ticks
getPlayerSlotItem(cid, slot) -- Returns an item if an item is found in the slot
getPlayerDepotItems(uid, depotid) -- Returns the player's depot items of a decent depot
getPlayerSex(cid) -- Returns the player's gender
getPlayerLookDir(cid) -- Returns the player's look direction
getPlayerStorageValue(uid,valueid) -- Returns the value of the value id of a player
setPlayerStorageValue(uid,valueid, newvalue) -- Adds a new value-id to the storage map of player
getGlobalStorageValue(valueid) -- Returns the value of the value id
getTilePzInfo(pos) 1 is pz. 0 no pz. -- Returns the protection zone status of a tile
getTileHouseInfo(pos). 0 no house. != 0 house id -- Returns the house status of a tile
getItemRWInfo(uid) -- Check if the item is writeable
getThingfromPos(pos) -- Returns something that matches the position
getThingPos(uid) -- Returns the position of something
getPlayerByName(name) -- Returns a player if the name matches any player on the server
getContainerSize(uid) -- Returns the size of a container
getContainerCap(uid) -- Returns the capacity of a container
getContainerItem(uid, slot) -- Check if the slot contains a container
getHouseOwner(houseid) -- Returns the owner of a house
getHouseName(houseid) -- Returns the name of a house
getHouseEntry(houseid) -- Return the entry-position of a house
getHouseRent(houseid) -- Returns the rent of a house
getHouseTown(houseid) -- Returns the town-id of a house
getHouseAccessList(houseod, listid) -- Returns the house-id of a house that matches the listid
getHouseByPlayerName(playername) -- Returns the house-id of a house that matches the player's name
getWorldType() -- Returns the worldtype (0 = no-pvp, 1 = pvp, 2 = pvp-enf)
getWorldTime() -- Returns the ingame time
getWorldLight() -- Returns the light level of the server
getWorldCreatures(type) Returns the amount of creatures (0 players, 1 monsters, 2 npcs, 3 all)
getWorldUpTime() -- Returns the uptime of the server
getCreatureOutfit(cid) -- Returns the creature's outfit (in a table)
getCreaturePosition(cid) -- Returns the creature's position (in a table)
getCreatureName(cid) -- Returns the name of a creature
getItemName(itemid) -- Returns the item's name
getPlayerSkull(cid) -- Returns the skull-type of a player
getPlayerConditionTicks(cid, conditionid) -- Returns the ticks of a decent condtion of a player
getPlayerOutfitAddon(cid, looktype) -- Returns the addon-value of an outfit of a player
getItemStackable(itemid) -- Check if the item is stackable
getPlayerGuildStatus(name) -- Returns the player's guild status
getPlayerGuildName(name) -- Returns the guild's name if the player has a guild
getDataDir() -- Returns a string that is the data directory

Functions do

doRemoveItem(uid,n) -- Removes any item (from the map or player doesn't matter)
doPlayerFeed(uid,food) -- Increase the food ticks of a player
doPlayerSendCancel(uid,text) -- Send any cancel message to a player
doPlayerSendDefaultCancel(uid, ReturnValue) -- Send a cancel message to player
doTeleportThing(uid,newpos) -- Teleports something to a position
doTransformItem(uid,toitemid) -- Changes the item's id
doPlayerSay(uid,text,type) -- Let's the player say any text
doSendMagicEffect(position,type) -- Show a magic effect at a position
doChangeTypeItem(uid,new_type) -- Change the type/count of an item
doSetItemActionId(uid,actionid) -- Set the item's action id
doSetItemText(uid,text) -- Set the text of an item if you open it
doSetItemSpecialDescription(uid,desc) -- Set an item's description
doSendAnimatedText(position,text,color) -- Show animated text at a position (any text or color)
doPlayerAddSkillTry(cid,skillid,tries) -- Add skill tries to a decent skill
doPlayerAddHealth(cid,health) -- Add health to a player
doCreatureAddHealth(cid,health) -- Add health to a creature
doPlayerAddMana(cid,mana) -- Add mana to a player
doPlayerAddSoul(cid,soul) -- Add soul points to a player
doPlayerAddItem(cid,itemid,count or type) -- Add an item to a player -- returns uid of the created item
doPlayerSendTextMessage(cid,MessageClasses,message) -- Send a message to a player
doPlayerRemoveMoney(cid,money) -- Remove money from a player
doShowTextWindow(cid,maxlen,canWrite) -- Show a text dialog which is writable
doShowTextDialog(cid,itemid,text) -- Show a text dialog to a player that contains text
doDecayItem(uid) -- Start to decay an item
doCreateItem(itemid,type or count,position) -- Only working on ground; Returns uid of the created item
doSummonCreature(name, position) -- Creates a creature
doMoveCreature(cid, direction) -- Move a creature to a decent direction
doPlayerSetMasterPos(cid,pos) -- Set the player's temple position
doPlayerSetTown(cid,townid) -- Set the player's town-id
doPlayerSetVocation(cid,voc) -- Set the player's vocation
doPlayerRemoveItem(cid,itemid,count) -- Remove an item from a player
doPlayerAddExp(cid,exp) -- Add experience to a player
doSetCreatureLight(cid, lightLevel, lightColor, time) -- Add a new light condtion to a player
doAddContainerItem(uid, itemid, count or subtype) -- Add an item to a container
doCombat(cid, combat, param) -- Execute the combat object
doAreaCombatHealth(cid, type, pos, area, min, max, effect) -- Change any creature's health (area)
doTargetCombatHealth(cid, target, type, min, max, effect) -- Change any creature's health (target)
doAreaCombatMana(cid, pos, area, min, max, effect) -- Change any creature's mana (area)
doTargetCombatMana(cid, target, min, max, effect) -- Change any creature's mana (target)
doAreaCombatCondition(cid, pos, area, condition, effect) -- Adds a condition (area)
doTargetCombatCondition(cid, target, condition, effect) -- Adds a condition (target)
doAreaCombatDispel(cid, pos, area, type, effect) -- Removes a condition (area)
doTargetCombatDispel(cid, target, type, effect) -- Removes a condition (target)
doChallengeCreature(cid, target) -- Challenge a creature
doConvinceCreature(cid, target) -- Convince a creature
doChangeSpeed(cid, delta) -- Change the creature's speed
doSetMonsterOutfit(cid, name, time) -- Sets the creature's outfit to a monster look
doSetItemOutfit(cid, item, time) -- Sets the creature's outfit to an item
doSetCreatureOutfit(cid, outfit, time) -- Sets the creature's outfit (table required)
doPlayerLearnSpell(cid, spellwords) -- Learn a spell to a player
doPlayerAddBlesing(cid, blessid) -- Add a blessing to a player

Functions add

addExhaust(cid) -- adds exhaust
addDamageCondition(condition, key, rounds, time, value) -- Adds a damage value to a condtion
addOutfitCondition(condition, lookTypeEx, lookType, lookHead, lookBody, lookLegs, lookFeet) -- Adds a new outfit condtion to a creature
addEvent(callback, delay, parameter) -- Add an event

Functions is

isPlayer(cid) -- Check if something is a creature
isCreature(cid) -- Check if something is a creature
isContainer(uid)-- Check if something is a container
isMoveable(uid) -- Check if something is moveable
sItemStackable(itemid) -- Check if an item is stackable
isItemRune(itemid) -- Check if an item is a rune
isItemDoor(itemid) -- Check if an item is a door
isItemContainer(itemid) -- Check if an item is a container
isItemFluidContainer(itemid) -- Check if an item is a fluid
isPremium(cid) -- Check if the player is premium
isInArray(array, value) -- Check if an array contains a decent value

Functions set

setPlayerStorageValue(uid,valueid, newvalue) -- Adds a new value-id to the storage map of player
setGlobalStorageValue(valueid, newvalue) -- Adds a new value-id to the storage map
setHouseAccessList(houseid, listid, listtext) -- Set the accesslist of a door or anything else in a house
setHouseOwner(houseid, ownername) -- Set the owner of a house
setCombatArea(combat, area) -- Set the area of a combat object
setCombatCondition(combat, condition) -- Adds a condtion to a combat object
setCombatParam(combat, key, value) -- Adds a parameter to a combat object with a decent value
setConditionParam(condition, key, value) -- Adds a parameter to a condition with a decent value
setCombatCallBack(combat, key, function_name) -- Set the callback of a combat object
setCombatFormula(combat, type, mina, minb, maxa, maxb) -- Set the combat's formula
setConditionFormula(combat, mina, minb, maxa, maxb) -- Set the condition's formula
setPlayerGuildStatus(guildstatus, name) -- Set the player's guild status
setPlayerGuild(name, guildstatus, guilrank, guildname) -- Edit the guild stats of a player
setPlayerGuildNick(name, guildnick) -- Set the nick of the player
setPlayerGuildTitle(name, guildnick) -- Set the nick of the player

Different

registerCreature(cid) -- Returns and adds a new creature to the script
createCombatArea( {area}, {extArea} ) -- Create a new combat area
createConditionObject(type) -- Creates a new condition (condition-type required)
createCombatObject() -- Creates a new combat object
foundNewGuild(guildname) -- Create a new guild
clearPlayerGuild(name) -- Remove a player from a guild
debugPrint(text) -- Print a message in the console
stopEvent(eventid) -- Stops an added event

Poradnik by:Xafaso
 

Chris

Senior User
Joined
Apr 5, 2008
Messages
733
Reaction score
181
Age
31
brawo! wszystko zebrane w jednym miejscu, mi sie bardzo podoba ;]
 

Yoshitsune

New User
Joined
Jul 12, 2008
Messages
6
Reaction score
0
widac ze sie troche na meczyles spis jest swietny!! Oby tak dalej

P.S Sam z niego skorzystalem :p
 

Hoxaver

Advanced User
Joined
Apr 4, 2008
Messages
300
Reaction score
60
Naprawd? dobrze, ?e to tutaj umie?ci?e?. Najbardziej podoba mi si? Instalowanie OTServa jako us?ugi Windowsa, je?eli to zadzia?a b?dzie super.
 

Haalwa

Advanced User
Joined
Jul 5, 2008
Messages
201
Reaction score
8
Nie wiem co za moderator go przyklei? ale Dzi?kuj? za to.

Pozdrawiam. Nied?ugo dalsza cz???.
 

kamilos12

User
Joined
Apr 4, 2008
Messages
14
Reaction score
0
Odp: Poradniki Ots (Dzie?a Zebrane) Zgromadzone by Haalwa

Bardzo dobry poradnik dam ci reputa za niego bo duzo rzeczy mi sie przyda?o.
 

adi970

Advanced User
Joined
Sep 3, 2008
Messages
197
Reaction score
6
Odp: Poradniki Ots (Dzie?a Zebrane) Zgromadzone by Haalwa

nice nice reput4YOU:):):)poradnik fajny zrob jeszcze jak sie robi acc managera
 

Hoster

Senior User
Joined
May 22, 2008
Messages
1,093
Reaction score
34
Odp: Poradniki Ots (Dzie?a Zebrane) Zgromadzone by Haalwa

@UP
Acc maker czyli na stronie tworzy si? konto, czy acc menager czyli na passach (np. 111111/tibia)

@Topic
Poradnik super ;) Mam nadziej?, ?e dalsza cz??? b?dzie nied?ugo :D Reput leci
 
Last edited:

Black Blade

Active User
Joined
Jun 6, 2008
Messages
113
Reaction score
5
Odp: Poradniki Ots (Dzie?a Zebrane) Zgromadzone by Haalwa

Poradnik troch? oczojebny przez ten yellow, ale og?lnie tre?ciwy:) Dla na prawd? zielonych. Bardzo mi si? podoba. Gdybym mia? mo?liwo?? dodawania reputacji zrobi?bym to, lecz teraz tylko Moderator+ mo?e to robi?.

Pozdrawiam.
 

Soul of dragon

Active User
Joined
Apr 5, 2008
Messages
138
Reaction score
5
Odp: Poradniki Ots (Dzie?a Zebrane) Zgromadzone by Haalwa

Bosko Haalwa. Korzystam czasem z funkcji lua. Wszystko w jednym miejscu. Jest czytelnie itp. itd. same plusy.
 

Marszal

Senior User
Joined
May 29, 2008
Messages
606
Reaction score
18
Age
29
Odp: Poradniki Ots (Dzie?a Zebrane) Zgromadzone by Haalwa

Przydatne i dosyc czytelne mi sie przydalo nie wiem jak innym ;p
 

Emparion

User
Joined
Sep 17, 2008
Messages
28
Reaction score
0
Odp: Poradniki Ots (Dzie?a Zebrane) Zgromadzone by Haalwa

faaaaaajny poradnik ;D troche duzo tego :cool:
 

glucio

New User
Joined
Oct 17, 2008
Messages
1
Reaction score
0
Odp: Poradniki Ots (Dzie?a Zebrane) Zgromadzone by Haalwa

ooki ale ja nie wiem o co hodzi morze ktos mi pomuc zrobic jakos otsa pod tibie 8,1 prosze was pisac prosze gg:10841339 skype:glucio46
 
Top