• logo_cipsoft
    Nowe serwery zostały otwarte 19 Lut 2025:
    Noctalia (Open PvP) Ignitera (Open PvP) us_logo Xybra (Open PvP)

[7.92+] Firma poprawiaj?ca skrypty by Ovner & Gelio

Status
Zamknięty.

Ovner

Senior User
Dołączył
Czerwiec 21, 2009
Posty
528
Liczba reakcji
52
Wiek
32
Witajcie!
Temat powsta? specjalnie dla tych u?ytkownik?w, kt?rzy maj? problem z jakim? skryptem.
Aby z?o?y? pro?b? o poprawienie skryptu najpierw zapoznaj si? z regulaminem sk?adania pr??b !



! Regulamin sk?adania pr??b !


Je?li chcesz doda? swoj? pro?b? o poprawienie skryptu :

1. Najpierw zobacz ile pr??b czeka w kolejce.
Czyli w kolejce mog? by? maksymalnie 3 aktywne pro?by. Gdy s? 3 pro?by aktywne, a kto? doda nast?pn? pro?b?, ten?e autor zostanie ukarany ostrze?eniem.


2. Nie przerabiamy skrypt?w starszych ni? wersja 7.60 ( wraz z t? wersj? ! )


! Wz?r dodawania pr??b !


Wersja tibii : 8.42
Silnik : TFS 0.3.4PL2
Tre?? b??du / opis b??du : Nie teleportuje mnie.
Skrypt : TUTAJ PODAJEMY SKRYPT TYLKO W [.CODE]SKRYPT[./CODE]
Ewentualne uwagi : Tylko zostaw mi tre?? wysy?an? do playera po tepni?ciu.


Ka?da pro?b?, kt?ra b?dzie ?le dodana, nie b?dzie np. WERSJI SILNIKA ( 0.3.4PL2 ) b?dzie od razu karana ostrze?eniem przez moderatora.


WSZYSTKIE POSTY INNE PR?CZ SK?ADANIA PR??B B?D? USUWANE, A AUTOR POSTU KARANY OSTRZE?ENIEM !


Skrypty przerabiane/poprawiane b?d? tylko przez u?ytkownik?w Ovner oraz Gelio.
Wi?c je?li chcecie z?o?y? podzi?kowania to tylko na PW.



REGULAMIN W KA?DEJ CHWILI MO?E ULEC ZMIANIE !
ZOSTANIECIE POINFORMOWANI TYM, GDY MODERATOR NAPISZE POST "REGULAMIN ZMIENIONY" PROSZ? UWA?NIE CZYTA? POSTY !!

Temat przylepiam, regulamin zatwierdzony, z?amanie punktu regulaminu tematu b?dzie karane 2 pkt ostrze?e?. /Kurtis
 
Odp: [7.92+] Firma poprawiaj?ca skrypty by Ovner & Gelio

Wersja tibii : 8.42
Silnik : TFS 0.3.4PL2
Tre?? b??du / opis b??du : Chce przerobic skrypt
Skrypt :
Kod:
local posx = 160 -- POZYCJA X
local posy = 54 -- POZYCJA Y
local posz = 7 -- POZYCJA Z
--
function onUse(cid, item, frompos, item2, topos)
--
local condition = getCreatureCondition(cid, CONDITION_INFIGHT)
local pos = getPlayerPosition(cid)
local condition2 = getCreatureCondition(cid, CONDITION_EXHAUST)
--
local EXHAUST_TIME = 10 -- minut ma trwa? exhaust
local EXHAUST_STOR = 7286
--
	if  (condition == TRUE) then
		doPlayerSendCancel(cid, "Masz pz nie spierdolisz :D.")
	elseif (os.time() < getPlayerStorageValue(cid, EXHAUST_STOR)) then
		doSendMagicEffect(frompos, CONST_ME_POFF)
		doPlayerSendCancel(cid, "Musisz jeszce poczkeac.")
	else
		doTeleportThing(cid, {x=posx, y=posy, z=posz})
		setPlayerStorageValue(cid, EXHAUST_STOR, os.time() + EXHAUST_TIME*60)
		doSendMagicEffect(pos, 21)
	end
	return 1
end
Ewentualne uwagi : Chce zeby nie tepalo graczy ze skullem ale jak zabil potwora to moze ;]
 
Odp: [7.92+] Firma poprawiaj?ca skrypty by Ovner & Gelio

Wersja tibii : 8.42
Silnik : TFS 0.3.4PL2
Tre?? b??du / opis b??du : Podczas odpalania OTS'a nie moze zaladowac i otworzyc travel.lua
Screen bedzie najlepszy chyba:
2liu7x0.jpg

Skrypty :
/captain.lua
Kod:
nvm
/hook.xml
Kod:
<?xml version="1.0" encoding="UTF-8"?>
<npc name="Hook" script="captain.lua" walkinterval="2000" floorchange="0"> 
	<health now="100" max="100"/>
	<look type="128" head="17" body="54" legs="114" feet="0"/>
	<parameters>
		<parameter key="message_greet" value="Hello |PLAYERNAME|."/>
	</parameters>
</npc>
Ewentualne uwagi : Prosze to poprawic.
 
Ostatnia edycja:
Odp: [7.92+] Firma poprawiaj?ca skrypty by Ovner & Gelio

Niestety ale wywala error
przechwytywaniet.jpg

Wcze?niej by?a wklejona my?la?em ze zadzia?a wi?c usuno?em pro?be ale nie dzia?a wi?c napisa?em post ..
 
Ostatnia edycja:
Odp: [7.92+] Firma poprawiaj?ca skrypty by Ovner & Gelio

@Ldrozd
Powinno dzia?a? :
Kod:
<?xml version="1.0" encoding="UTF-8"?>
<npc name="Hook" script="data/npc/scripts/captain.lua" walkinterval="2000" floorchange="0"> 
	<health now="100" max="100"/>
	<look type="128" head="17" body="54" legs="114" feet="0"/>
	<parameters>
		<parameter key="message_greet" value="Hello |PLAYERNAME|."/>
	</parameters>
</npc>

Zamiast starego NPC wklej tego i powinno dzia?a?.

@vooden
Przeczytaj regulamin !
Ka?d? pro?b? jak wklejamy !
 
Odp: [7.92+] Firma poprawiaj?ca skrypty by Ovner & Gelio

Wersja tibii : 8.00
Silnik : Devland 0.9.60 XML
Tre?? b??du / opis b??du : lua:55: '<eof>' expected near 'end'
Skrypt :
Kod:
---Transformation System 1.0---
function onSay(cid, words, param)
--Goku Kaioken--
local mana = 100
local voce = 1 
local lvl = 30 
local voc = 2 
local pacc = 0 
local pacce = 1  
local outfit = {lookType=75,lookHead=0,lookAddons=0,lookLegs=0,lookBody=0,lookFeet=0} 
local outfitTime = 9000000 
local text = "Aaaah" 
local effect = 101 
--------------------------------koniec ustawien---------
----------------------kod-----------------------------
if(getPlayerMana(cid) >= mana and getPlayerVocation(cid) == voce and getPlayerLevel(cid) >= lvl and isPremium(cid) == pacc or isPremium(cid) == pacce and getPlayerVocation(cid) < voc )then
doPlayerSetVocation(cid,voc)
doPlayerAddMana(cid,-mana)
doSetCreatureOutfit(cid, outfit, outfitTime)
doPlayerSay(cid,text,16)
local pos = getPlayerPosition(cid)
doSendMagicEffect(pos,effect)
setPlayerStorageValue(cid,312,1)
setPlayerStorageValue(cid,5,getPlayerVocation(cid))
else
doPlayerSendCancel(cid,"Dostosuj sie do wymagan.")
end
--Goku Ssj--
local mana = 100
local voce = 1 
local lvl = 30 
local voc = 2 
local pacc = 0 
local pacce = 1  
local outfit = {lookType=75,lookHead=0,lookAddons=0,lookLegs=0,lookBody=0,lookFeet=0} 
local outfitTime = 9000000 
local text = "Aaaah" 
local effect = 101 
--------------------------------koniec ustawien---------
----------------------kod-----------------------------
if(getPlayerMana(cid) >= mana and getPlayerVocation(cid) == voce and getPlayerLevel(cid) >= lvl and isPremium(cid) == pacc or isPremium(cid) == pacce and getPlayerVocation(cid) < voc )then
doPlayerSetVocation(cid,voc)
doPlayerAddMana(cid,-mana)
doSetCreatureOutfit(cid, outfit, outfitTime)
doPlayerSay(cid,text,16)
local pos = getPlayerPosition(cid)
doSendMagicEffect(pos,effect)
setPlayerStorageValue(cid,312,1)
setPlayerStorageValue(cid,5,getPlayerVocation(cid))
else
doPlayerSendCancel(cid,"Dostosuj sie do wymagan.")
end
end
return 1
end
end
Ewentualne uwagi : Chcia?em, ?eby mo?na by?o za pomoc? jednego s?owa tranform ca?y czas przechodzi? w kolejne formy wiecie o co chodzi?
 
Odp: [7.92+] Firma poprawiaj?ca skrypty by Ovner & Gelio

#bazia12345
Kod:
--Transformation System 1.0---
	function onSay(cid, words, param)
	
--Goku Kaioken--
local mana = 100
local voce = 1 
local lvl = 30 
local voc = 2 
local pacc = 0 
local pacce = 1  
local outfit = {lookType=75,lookHead=0,lookAddons=0,lookLegs=0,lookBody=0,lookFeet=0} 
local outfitTime = 9000000 
local text = "Aaaah" 
local effect = 101 

------------------koniec ustawien---------------------
----------------------kod-----------------------------

if(getPlayerMana(cid) >= mana and getPlayerVocation(cid) == voce and getPlayerLevel(cid) >= lvl and isPremium(cid) == pacc or isPremium(cid) == pacce and getPlayerVocation(cid) < voc )then

doPlayerSetVocation(cid,voc)
doPlayerAddMana(cid,-mana)
doSetCreatureOutfit(cid, outfit, outfitTime)
doPlayerSay(cid,text,16)
local pos = getPlayerPosition(cid)
doSendMagicEffect(pos,effect)
setPlayerStorageValue(cid,312,1)
setPlayerStorageValue(cid,5,getPlayerVocation(cid))

		else
		
doPlayerSendCancel(cid,"Dostosuj sie do wymagan.")

	end
	
--Goku Ssj--
local mana = 100
local voce = 1 
local lvl = 30 
local voc = 2 
local pacc = 0 
local pacce = 1  
local outfit = {lookType=75,lookHead=0,lookAddons=0,lookLegs=0,lookBody=0,lookFeet=0} 
local outfitTime = 9000000 
local text = "Aaaah" 
local effect = 101 

--------------------------------koniec ustawien---------
----------------------kod-----------------------------

if(getPlayerMana(cid) >= mana and getPlayerVocation(cid) == voce and getPlayerLevel(cid) >= lvl and isPremium(cid) == pacc or isPremium(cid) == pacce and getPlayerVocation(cid) < voc )then

doPlayerSetVocation(cid,voc)
doPlayerAddMana(cid,-mana)
doSetCreatureOutfit(cid, outfit, outfitTime)
doPlayerSay(cid,text,16)
local pos = getPlayerPosition(cid)
doSendMagicEffect(pos,effect)
setPlayerStorageValue(cid,312,1)
setPlayerStorageValue(cid,5,getPlayerVocation(cid))

		else
		
doPlayerSendCancel(cid,"Dostosuj sie do wymagan.")

                end
          end
          return 1
    end

Oto Tw?j skrypcik.
 
Ostatnia edycja:
Odp: [7.92+] Firma poprawiaj?ca skrypty by Ovner & Gelio

Wersja tibii : 8.00
Silnik : Devland 0.9.60 XML
Tre?? b??du / opis b??du : internalGetPlayerInfo(). Player not found info = 2
Skrypt :
Kod:
function onSay(cid, words, param)
end
local text = "Transform"
local lvl = 50
local voce = 52
local voc = 53
local outfit = {lookType=104,lookHead=0,lookAddons=0,lookLegs=0,lookbody=0,lookFeet=0}
local effect = 17
---
if getPlayerLevel(cid,lvl) >= lvl and getPlayerVocation(cid) <= voc then
doPlayerSetVocation(cid,voc)
doSetCreatureOutfit(cid, outfit, -1)
doPlayerSay(cid,text,16)
doSendMagicEffect(pos,effect)
end

Uwagi: Sam co? pr?bowa?em zrobi?, gdy? tamten skrypt wyda? mi si? za d?ugi
chodzi o uzyskanie kilku transf?w dla kilku profesji w jednym pliku, mam nadzieje, ?e teraz lepiej to wyt?umaczy?em ;p
 
Odp: [7.92+] Firma poprawiaj?ca skrypty by Ovner & Gelio

No w?a?nie kiedy nie ma end to tak?e wywala b??d ;/
Tre?? b??du: lua:14: 'end' expected (to close 'function' at line 1) near <eof>
Po prostu tego nie rozumiem :( Jakby co to dopiero zaczynam przygod? z Lua ;p
@edit
doda?em na ko?cu skryptu drugie end i na pocz?tku gdy wczytuje si? silnik nie wywala b??du ale gdy wpisze transformtion to w konsoli pojawia si? ten poprzedni b??d ;/
 
Ostatnia edycja:
Odp: [7.92+] Firma poprawiaj?ca skrypty by Ovner & Gelio

Ten skrypt powinien dzia?a?.
Niepoprawnie zamkn??e? funkcje :> czyli nie zako?czy?e? skrypty, nie zamkn??e? etc ;]

Kod:
function onSay(cid, words, param)
local text = "Transform"
local lvl = 50
local voce = 52
local voc = 53
local outfit = {lookType=104,lookHead=0,lookAddons=0,lookLegs=0,lookbody=0,lookFeet=0}
local effect = 17
---
if getPlayerLevel(cid,lvl) >= lvl and getPlayerVocation(cid) <= voc then
doPlayerSetVocation(cid,voc)
doSetCreatureOutfit(cid, outfit, -1)
doPlayerSay(cid,text,16)
doSendMagicEffect(pos,effect)
                end
          end
          return 1
    end

Je?li znowu b?dzie jaki? problem pisz ?mia?o :>.
 
Odp: [7.92+] Firma poprawiaj?ca skrypty by Ovner & Gelio

Wersja tibii : 8.42
Silnik : TFS 0.3.4
Tre?? b??du:
[04/07/2009 00:00:31] Lua Script Error: [MoveEvents Interface]
[04/07/2009 00:00:31] data/movements/scripts/arenaroom.lua:onStepIn

[04/07/2009 00:00:31] data/movements/scripts/arenaroom.lua:11: attempt to compare number with string
[04/07/2009 00:00:31] stack traceback:
[04/07/2009 00:00:31] data/movements/scripts/arenaroom.lua:11: in function <data/movements/scripts/arenaroom.lua:1>

[04/07/2009 00:00:33] Lua Script Error: [MoveEvents Interface]
[04/07/2009 00:00:33] data/movements/scripts/arenaroom.lua:onStepIn

Skrypt
Kod:
function onStepIn(cid, item, position, fromPosition)
	if InitArenaScript == 0 then
		InitArenaScript = 1
		checkArenaRooms({})
	end
	local arena_room = item.actionid
	local player_arena = getPlayerStorageValue(cid, 42355)
	if getPlayerStorageValue(cid, arena_room+getPlayerStorageValue(cid, 42355)*10-1) == 1 or arena_room+getPlayerStorageValue(cid, 42355)*10-1 == 42299 then
		if getGlobalStorageValue(cid, arena_room) == 0 then
			local monster_uid = getGlobalStorageValue(arena_room+100)
			if monster_uid > 0 then
				if isCreature(monster_uid) == TRUE then
					doRemoveCreature(monster_uid)
				end
			end
			local spawn_pos = getThingPos(arena_room)
			local monster = doSummonCreature(arena_monsters[arena_room+getPlayerStorageValue(cid, 42355)*10], {x=spawn_pos.x-1,y=spawn_pos.y-1,z=spawn_pos.z})
			setGlobalStorageValue(arena_room+100, monster)
			doTeleportThing(cid, spawn_pos, TRUE)
			setGlobalStorageValue(arena_room, cid)
			setGlobalStorageValue(arena_room-1, 0)
			setPlayerStorageValue(cid, 42350, os.time()+arena_room_max_time)
		else
			doTeleportThing(cid, fromPosition, TRUE)
			doPlayerSendTextMessage(cid,MESSAGE_STATUS_CONSOLE_ORANGE,getCreatureName(getGlobalStorageValue(cid, arena_room))..' jest teraz w tym pokuj. Zaczekaj chwile.')
		end
	else
		doTeleportThing(cid, fromPosition, TRUE)
		doPlayerSendTextMessage(cid,MESSAGE_STATUS_CONSOLE_ORANGE,'Najpierw zabij potwora!')
	end
	if arena_room == 42300 then
		setPlayerStorageValue(cid, 42351, 0)
		setPlayerStorageValue(cid, 42352, 1)
	end
	return TRUE
end
function checkArenaRooms(param)
	addEvent(checkArenaRooms, 1000, {})
	for i = 42300, 42309 do
		local player = getGlobalStorageValue(i)
		if isPlayer(player) == TRUE then
			local player_storage = getPlayerStorageValue(player, 42350)
			if player_storage <= os.time() then
				doTeleportThing(player, arenaKickPosition, TRUE)
				setPlayerStorageValue(player, 42350, 0)
				setGlobalStorageValue(i, 0)
				doPlayerSendTextMessage(player,MESSAGE_STATUS_CONSOLE_ORANGE,'Zostales wyrzucony z areny!')
			elseif player_storage - 10 <= os.time() then
				doPlayerSendTextMessage(player,MESSAGE_EVENT_DEFAULT,'Masz ' .. player_storage - os.time() .. ' sekund, zeby przejsc do kolejnego pokoju!')
			end
		else
			setGlobalStorageValue(i, 0)
		end
	end
end
 
Ostatnia edycja:
Odp: [7.92+] Firma poprawiaj?ca skrypty by Ovner & Gelio

@Sones Tw?j skrypcik mam nadzieje, ?e dzia?a! :).

Kod:
function onStepIn(cid, item, position, fromPosition)
	if InitArenaScript == 0 then
		InitArenaScript = 1
		checkArenaRooms({})
	end
	local arena_room = item.actionid
	local player_arena = getPlayerStorageValue(cid, 42355)
	if getPlayerStorageValue(cid, arena_room+getPlayerStorageValue(cid, 42355)*10-1) == 1 or arena_room+getPlayerStorageValue(cid, 42355)*10-1 == 42299 then
		if getGlobalStorageValue(cid, arena_room) == 0 then
			local monster_uid = getGlobalStorageValue(arena_room+100)
			if monster_uid ~= 0 then
				if isCreature(monster_uid) == TRUE then
					doRemoveCreature(monster_uid)
				end
			end
			local spawn_pos = getThingPos(arena_room)
			local monster = doSummonCreature(arena_monsters[arena_room+getPlayerStorageValue(cid, 42355)*10], {x=spawn_pos.x-1,y=spawn_pos.y-1,z=spawn_pos.z})
			setGlobalStorageValue(arena_room+100, monster)
			doTeleportThing(cid, spawn_pos, TRUE)
			setGlobalStorageValue(arena_room, cid)
			setGlobalStorageValue(arena_room-1, 0)
			setPlayerStorageValue(cid, 42350, os.time()+arena_room_max_time)
		else
			doTeleportThing(cid, fromPosition, TRUE)
			doPlayerSendTextMessage(cid,MESSAGE_STATUS_CONSOLE_ORANGE,getCreatureName(getGlobalStorageValue(cid, arena_room))..' jest teraz w tym pokuj. Zaczekaj chwile.')
		end
	else
		doTeleportThing(cid, fromPosition, TRUE)
		doPlayerSendTextMessage(cid,MESSAGE_STATUS_CONSOLE_ORANGE,'Najpierw zabij potwora!')
	end
	if arena_room == 42300 then
		setPlayerStorageValue(cid, 42351, 0)
		setPlayerStorageValue(cid, 42352, 1)
	end
	return TRUE
end

function checkArenaRooms(param)
	addEvent(checkArenaRooms, 1000, {})
	for i = 42300, 42309 do
		local player = getGlobalStorageValue(i)
		if isPlayer(player) == TRUE then
			local player_storage = getPlayerStorageValue(player, 42350)
			if player_storage <= os.time() then
				doTeleportThing(player, arenaKickPosition, TRUE)
				setPlayerStorageValue(player, 42350, 0)
				setGlobalStorageValue(i, 0)
				doPlayerSendTextMessage(player,MESSAGE_STATUS_CONSOLE_ORANGE,'Zostales wyrzucony z areny!')
			elseif player_storage - 10 <= os.time() then
				doPlayerSendTextMessage(player,MESSAGE_EVENT_DEFAULT,'Masz ' .. player_storage - os.time() .. ' sekund, zeby przejsc do kolejnego pokoju!')
			end
		else
			setGlobalStorageValue(i, 0)
		end
	end
	return TRUE
end
 
Odp: [7.92+] Firma poprawiaj?ca skrypty by Ovner & Gelio

Wersja tibii : 8.42
Silnik : TFS 0.3.4PL2
Tre?? b??du / opis b??du : Nie teleportuje mnie.
Skrypt :

Blad ktory sie pojawia jak chce wejsc do tp

[04/07/2009 09:57:54] Lua Script Error: [MoveEvents Interface]
[04/07/2009 09:57:54] data/movements/scripts/arenaroom.lua:onStepIn

[04/07/2009 09:57:54] luaGetThingPos(). Thing not found

[04/07/2009 09:57:54] Lua Script Error: [MoveEvents Interface]
[04/07/2009 09:57:55] data/movements/scripts/arenaroom.lua:onStepIn

[04/07/2009 09:57:55] luaDoCreateMonster(). Cannot create monster: frostfur

patrzy?em czy jest ten monster frosfur i jest bo jak /m frostfur to sie pojawia


SKRYPT

Kod:
function onStepIn(cid, item, position, fromPosition)
	if InitArenaScript == 0 then
		InitArenaScript = 1
		checkArenaRooms({})
	end
	local arena_room = item.actionid
	local player_arena = getPlayerStorageValue(cid, 42355)
	if getPlayerStorageValue(cid, arena_room+getPlayerStorageValue(cid, 42355)*10-1) == 1 or arena_room+getPlayerStorageValue(cid, 42355)*10-1 == 42299 then
		if getGlobalStorageValue(cid, arena_room) == 0 then
			local monster_uid = getGlobalStorageValue(arena_room+100)
			if monster_uid ~= 0 then
				if isCreature(monster_uid) == TRUE then
					doRemoveCreature(monster_uid)
				end
			end
			local spawn_pos = getThingPos(arena_room)
			local monster = doSummonCreature(arena_monsters[arena_room+getPlayerStorageValue(cid, 42355)*10], {x=spawn_pos.x-1,y=spawn_pos.y-1,z=spawn_pos.z})
			setGlobalStorageValue(arena_room+100, monster)
			doTeleportThing(cid, spawn_pos, TRUE)
			setGlobalStorageValue(arena_room, cid)
			setGlobalStorageValue(arena_room-1, 0)
			setPlayerStorageValue(cid, 42350, os.time()+arena_room_max_time)
		else
			doTeleportThing(cid, fromPosition, TRUE)
			doPlayerSendTextMessage(cid,MESSAGE_STATUS_CONSOLE_ORANGE,getCreatureName(getGlobalStorageValue(cid, arena_room))..' jest teraz w tym pokuj. Zaczekaj chwile.')
		end
	else
		doTeleportThing(cid, fromPosition, TRUE)
		doPlayerSendTextMessage(cid,MESSAGE_STATUS_CONSOLE_ORANGE,'Najpierw zabij potwora!')
	end
	if arena_room == 42300 then
		setPlayerStorageValue(cid, 42351, 0)
		setPlayerStorageValue(cid, 42352, 1)
	end
	return TRUE
end
function checkArenaRooms(param)
	addEvent(checkArenaRooms, 1000, {})
	for i = 42300, 42309 do
		local player = getGlobalStorageValue(i)
		if isPlayer(player) == TRUE then
			local player_storage = getPlayerStorageValue(player, 42350)
			if player_storage <= os.time() then
				doTeleportThing(player, arenaKickPosition, TRUE)
				setPlayerStorageValue(player, 42350, 0)
				setGlobalStorageValue(i, 0)
				doPlayerSendTextMessage(player,MESSAGE_STATUS_CONSOLE_ORANGE,'Zostales wyrzucony z areny!')
			elseif player_storage - 10 <= os.time() then
				doPlayerSendTextMessage(player,MESSAGE_EVENT_DEFAULT,'Masz ' .. player_storage - os.time() .. ' sekund, zeby przejsc do kolejnego pokoju!')
			end
		else
			setGlobalStorageValue(i, 0)
		end
	end
	return TRUE
end
 
Ostatnia edycja:
Odp: [7.92+] Firma poprawiaj?ca skrypty by Ovner & Gelio

@Sones sprawd? teraz ten skrypcik ... mam nadziej?, ?e teraz zadzia?a :>.


Kod:
function onStepIn(cid, item, position, fromPosition)
	if InitArenaScript == 0 then
		InitArenaScript = 1
		checkArenaRooms({})
	end
	local arena_room = item.uid
	local player_arena = getPlayerStorageValue(cid, 42355)
	if getPlayerStorageValue(cid, arena_room+getPlayerStorageValue(cid, 42355)*10-1) == 1 or arena_room+getPlayerStorageValue(cid, 42355)*10-1 == 42299 then
		if getGlobalStorageValue(cid, arena_room) == 0 then
			local monster_uid = getGlobalStorageValue(arena_room+100)
			if monster_uid ~= 0 then
				if isCreature(monster_uid) == TRUE then
					doRemoveCreature(monster_uid)
				end
			end
			local spawn_pos = getThingPos(item.uid)
			local monster = doSummonCreature(arena_monsters[arena_room+getPlayerStorageValue(cid, 42355)*10], {x=spawn_pos.x-1,y=spawn_pos.y-1,z=spawn_pos.z})
			setGlobalStorageValue(arena_room+100, monster)
			doTeleportThing(cid, spawn_pos, TRUE)
			setGlobalStorageValue(arena_room, cid)
			setGlobalStorageValue(arena_room-1, 0)
			setPlayerStorageValue(cid, 42350, os.time()+arena_room_max_time)
		else
			doTeleportThing(cid, fromPosition, TRUE)
			doPlayerSendTextMessage(cid,MESSAGE_STATUS_CONSOLE_ORANGE,getCreatureName(getGlobalStorageValue(cid, arena_room))..' jest teraz w tym pokuj. Zaczekaj chwile.')
		end
	else
		doTeleportThing(cid, fromPosition, TRUE)
		doPlayerSendTextMessage(cid,MESSAGE_STATUS_CONSOLE_ORANGE,'Najpierw zabij potwora!')
	end
	if arena_room == 42300 then
		setPlayerStorageValue(cid, 42351, 0)
		setPlayerStorageValue(cid, 42352, 1)
	end
	return TRUE
end
function checkArenaRooms(param)
	addEvent(checkArenaRooms, 1000, {})
	for i = 42300, 42309 do
		local player = getGlobalStorageValue(i)
		if isPlayer(player) == TRUE then
			local player_storage = getPlayerStorageValue(player, 42350)
			if player_storage <= os.time() then
				doTeleportThing(player, arenaKickPosition, TRUE)
				setPlayerStorageValue(player, 42350, 0)
				setGlobalStorageValue(i, 0)
				doPlayerSendTextMessage(player,MESSAGE_STATUS_CONSOLE_ORANGE,'Zostales wyrzucony z areny!')
			elseif player_storage - 10 <= os.time() then
				doPlayerSendTextMessage(player,MESSAGE_EVENT_DEFAULT,'Masz ' .. player_storage - os.time() .. ' sekund, zeby przejsc do kolejnego pokoju!')
			end
		else
			setGlobalStorageValue(i, 0)
		end
	end
	return TRUE
end
 
Odp: [7.92+] Firma poprawiaj?ca skrypty by Ovner & Gelio

Wersja tibii : 8.00
Silnik : Devland 0.9.60 XML
Tre?? b??du / opis b??du : lua:17: '<eof>' expected near 'end'
Skrypt :
Kod:
function onSay(cid, words, param)
local text = "Transform"
local lvl = 50
local voce = 52
local voc = 53
local outfit = {lookType=104,lookHead=0,lookAddons=0,lookLegs=0,lookbody=0,lookFeet=0}
local effect = 17
---
if getPlayerLevel(cid,lvl) >= lvl and getPlayerVocation(cid) <= voc then
doPlayerSetVocation(cid,voc)
doSetCreatureOutfit(cid, outfit, -1)
doPlayerSay(cid,text,16)
doSendMagicEffect(pos,effect)
                end
          end
          return 1
    end
 
Ostatnia edycja:
Odp: [7.92+] Firma poprawiaj?ca skrypty by Ovner & Gelio

Wersja tibii : 8.42
Silnik : TFS 0.2.1 (Mystic Spirit)(roxor)
Tre?? b??du / opis b??du : Z?e dodawanie item?w z sms shopu tzn. dodaje item wiele razy np jak na lewej r?ce i prawej nie mamy ?adnego itemu to dodaje jeden item dwa razy na dwie r?ki lub jak s? pe?ne to nie dodaje wog?le a punkty wzie?o ze shopu, a powinien dawa? raz (i do bp tak mi si? wydaje, a nie na posta?).
Skrypt :
data\creaturescripts\scripts\login.lua
-- ### CONFIG ###
-- message send to player by script "type" (types you can check in "global.lua")
SHOP_MSG_TYPE = 17
-- time (in seconds) between connections to SQL database by shop script
SQL_interval = 30
-- ### END OF CONFIG ###
SQL_COMUNICATION_INTERVAL = SQL_interval * 1000
function onLogin(cid)
if(InitShopComunication == 0) then
local eventServ = addEvent(sql_communication, SQL_COMUNICATION_INTERVAL, {})
InitShopComunication = eventServ
end
registerCreatureEvent(cid, "PlayerDeath")
return TRUE
end
function sql_communication(parameters)
dofile("./config.lua")
env = assert(luasql.mysql())
con = assert(env:connect(mysqlDatabase, mysqlUser, mysqlPass, mysqlHost, mysqlPort))
result_plr = assert(con:execute("SELECT * FROM z_ots_comunication WHERE `type` = 'login';"))
todo = result_plr:fetch({}, "a")
while todo do
id = tonumber(todo.id)
action = tostring(todo.action)
delete = tonumber(todo.delete_it)
cid = getPlayerByName(tostring(todo.name))
if isPlayer(cid) == TRUE then
if action == 'show_msg' then
local msg_text = tostring(todo.param1)
local msg_type = todo.param2
doPlayerSendTextMessage(cid, msg_type, msgtext)
if delete == 1 then
delete = assert(con:execute("DELETE FROM `z_ots_comunication` WHERE `id` = " .. id .. ";"))
end
elseif action == 'give_item' then
local itemtogive_id = tonumber(todo.param1)
local itemtogive_count = tonumber(todo.param2)
local container_id = tonumber(todo.param3)
local container_count = tonumber(todo.param4)
local add_item_type = tostring(todo.param5)
local add_item_name = tostring(todo.param6)
local b_head_slot = getPlayerSlotItem(cid, 1)
local b_necklace_slot = getPlayerSlotItem(cid, 2)
local b_backpack_slot = getPlayerSlotItem(cid, 3)
local b_armor_slot = getPlayerSlotItem(cid, 4)
local b_right_hand = getPlayerSlotItem(cid, 5)
local b_left_hand = getPlayerSlotItem(cid, 6)
local b_legs_slot = getPlayerSlotItem(cid, 7)
local b_feet_slot = getPlayerSlotItem(cid, 8)
local b_ring_slot = getPlayerSlotItem(cid, 9)
local b_arrow_slot = getPlayerSlotItem(cid, 10)
if b_arrow_slot.itemid == 0 or (b_left_hand.itemid == 0 and b_right_hand.itemid == 0) then
local full_weight = 0
if add_item_type == 'container' then
container_weight = getItemWeight(container_id, 1)
items_weight = container_count * getItemWeight(itemtogive_id, itemtogive_count)
full_weight = items_weight + container_weight
else
full_weight = getItemWeight(itemtogive_id, itemtogive_count)
end
local free_cap = getPlayerFreeCap(cid)
if full_weight <= free_cap then
if add_item_type == 'container' then
local new_container = doCreateItemEx(container_id)
local iter = 0
while iter ~= container_count do
doAddContainerItem(new_container, itemtogive_id, itemtogive_count)
iter = iter + 1
end
doPlayerAddItemEx(cid, new_container)
itemtogive_id = container_id
else
local addeditem = doPlayerAddItem(cid, itemtogive_id, itemtogive_count)
end
local head_slot = getPlayerSlotItem(cid, 1)
local necklace_slot = getPlayerSlotItem(cid, 2)
local backpack_slot = getPlayerSlotItem(cid, 3)
local armor_slot = getPlayerSlotItem(cid, 4)
local right_hand = getPlayerSlotItem(cid, 5)
local left_hand = getPlayerSlotItem(cid, 6)
local legs_slot = getPlayerSlotItem(cid, 7)
local feet_slot = getPlayerSlotItem(cid, 8)
local ring_slot = getPlayerSlotItem(cid, 9)
local arrow_slot = getPlayerSlotItem(cid, 10)
if ring_slot.itemid == itemtogive_id or feet_slot.itemid == itemtogive_id or legs_slot.itemid == itemtogive_id or armor_slot.itemid == itemtogive_id or necklace_slot.itemid == itemtogive_id or head_slot.itemid == itemtogive_id or arrow_slot.itemid == itemtogive_id or left_hand.itemid == itemtogive_id or right_hand.itemid == itemtogive_id or backpack_slot.itemid == itemtogive_id then
if b_ring_slot.uid ~= ring_slot.uid or b_feet_slot.uid ~= feet_slot.uid or b_legs_slot.uid ~= legs_slot.uid or b_armor_slot.uid ~= armor_slot.uid or b_necklace_slot.uid ~= necklace_slot.uid or b_head_slot.uid ~= head_slot.uid or b_backpack_slot.uid ~= backpack_slot.uid or b_right_hand.uid ~= right_hand.uid or b_left_hand.uid ~= left_hand.uid or b_arrow_slot.uid ~= arrow_slot.uid then
doPlayerSendTextMessage(cid, SHOP_MSG_TYPE, 'You received >> '.. add_item_name ..' << from OTS shop. You should re-login now to become sure your new item will not disappear if any error occur.')
delete = assert(con:execute("DELETE FROM `z_ots_comunication` WHERE `id` = " .. id .. ";"))
assert(con:execute("UPDATE `z_shop_history_item` SET `trans_state`='realized', `trans_real`=" .. os.time() .. " WHERE id = " .. id .. ";"))
else
doPlayerSendTextMessage(cid, SHOP_MSG_TYPE, '>> '.. add_item_name ..' << from OTS shop not added. Unknown error occured. Wait about '.. SQL_interval ..' seconds. If error will occur again contact with admin. Error item ID is: '.. id ..'')
end
else
doPlayerSendTextMessage(cid, SHOP_MSG_TYPE, '>> '.. add_item_name ..' << from OTS shop not added. Unknown error occured. Wait about '.. SQL_interval ..' seconds. If error will occur again contact with admin. Error item ID is: '.. id ..'')
end
else
doPlayerSendTextMessage(cid, SHOP_MSG_TYPE, '>> '.. add_item_name ..' << from OTS shop is waiting for you. It weight is '.. full_weight ..' oz., you have only '.. free_cap ..' oz. free capacity. Put some items in depot or give to friend and wait about '.. SQL_interval ..' seconds to get it.')
end
else
doPlayerSendTextMessage(cid, SHOP_MSG_TYPE, '>> '.. add_item_name ..' << from OTS shop is waiting for you. Please take items from both hands or item from arrow slot and wait about '.. SQL_interval ..' seconds to get it.')
end
end
end
todo = result_plr:fetch (todo, "a")
end
con:close()
env:close()
local eventServ = addEvent(sql_communication, SQL_COMUNICATION_INTERVAL, parameters)
end
Ewentualne uwagi : Brak.
 
Odp: [7.92+] Firma poprawiaj?ca skrypty by Ovner & Gelio

@bazia
Napisa?em Ci co? na gg odpowiedz i mam nadzieje, ?e zadzia?a.

@desav
Spr?buj tego -

Kod:
-- ### CONFIG ###
-- message send to player by script "type" (types you can check in "global.lua")
SHOP_MSG_TYPE = 19
-- time (in seconds) between connections to SQL database by shop script
SQL_interval = 30
-- ### END OF CONFIG ###
SQL_COMUNICATION_INTERVAL = SQL_interval * 1000
function onLogin(cid)
	if(InitShopComunication == 0) then
		local eventServ = addEvent(sql_communication, SQL_COMUNICATION_INTERVAL, {})
		InitShopComunication = eventServ
	end
	registerCreatureEvent(cid, "PlayerDeath")
	return TRUE
end

function sql_communication(parameters)
	dofile("./config.lua")
	env = assert(luasql.mysql())
	con = assert(env:connect(mysqlDatabase, mysqlUser, mysqlPass, mysqlHost, mysqlPort))
	result_plr = assert(con:execute("SELECT * FROM z_ots_comunication WHERE `type` = 'login';"))
	todo = result_plr:fetch({}, "a")
	while todo do
		id = tonumber(todo.id)
		action = tostring(todo.action)
		delete = tonumber(todo.delete_it)
		cid = getPlayerByName(tostring(todo.name))
		if isPlayer(cid) == TRUE then
			local itemtogive_id = tonumber(todo.param1)
			local itemtogive_count = tonumber(todo.param2)
			local container_id = tonumber(todo.param3)
			local container_count = tonumber(todo.param4)
			local add_item_type = tostring(todo.param5)
			local add_item_name = tostring(todo.param6)
			local received_item = 0
			local full_weight = 0
			if add_item_type == 'container' then
				container_weight = getItemWeight(container_id, 1)
				if isItemRune(itemtogive_id) == TRUE then
					items_weight = container_count * getItemWeight(itemtogive_id, 1)
				else
					items_weight = container_count * getItemWeight(itemtogive_id, itemtogive_count)
				end
				full_weight = items_weight + container_weight
			else
				full_weight = getItemWeight(itemtogive_id, itemtogive_count)
				if isItemRune(itemtogive_id) == TRUE then
					full_weight = getItemWeight(itemtogive_id, 1)
				else
					full_weight = getItemWeight(itemtogive_id, itemtogive_count)
				end
			end
			local free_cap = getPlayerFreeCap(cid)
			if full_weight <= free_cap then
				if add_item_type == 'container' then
					local new_container = doCreateItemEx(container_id, 1)
					local iter = 0
					while iter ~= container_count do
						doAddContainerItem(new_container, itemtogive_id, itemtogive_count)
						iter = iter + 1
					end
					received_item = doPlayerAddItemEx(cid, new_container)
				else
					local new_item = doCreateItemEx(itemtogive_id, itemtogive_count)
					received_item = doPlayerAddItemEx(cid, new_item)
				end
				if received_item == RETURNVALUE_NOERROR then
					doPlayerSendTextMessage(cid, SHOP_MSG_TYPE, 'You received >> '.. add_item_name ..' << from OTS shop.')
					delete = assert(con:execute("DELETE FROM `z_ots_comunication` WHERE `id` = " .. id .. ";"))
					assert(con:execute("UPDATE `z_shop_history_item` SET `trans_state`='realized', `trans_real`=" .. os.time() .. " WHERE id = " .. id .. ";"))
				else
					doPlayerSendTextMessage(cid, SHOP_MSG_TYPE, '>> '.. add_item_name ..' << from OTS shop is waiting for you. Please make place for this item in your backpack/hands and wait about '.. SQL_interval ..' seconds to get it.')
				end
			else
				doPlayerSendTextMessage(cid, SHOP_MSG_TYPE, '>> '.. add_item_name ..' << from OTS shop is waiting for you. It weight is '.. full_weight ..' oz., you have only '.. free_cap ..' oz. free capacity. Put some items in depot and wait about '.. SQL_interval ..' seconds to get it.')
			end
		end
		todo = result_plr:fetch (todo, "a")
	end
	con:close()
	env:close()
	local eventServ = addEvent(sql_communication, SQL_COMUNICATION_INTERVAL, parameters)
end
 
Odp: [7.92+] Firma poprawiaj?ca skrypty by Ovner & Gelio

Silnik: TFS 0.3.3
Tibia:8.42

Skrypt:Vip System

Vip.lua:

Kod:
-- Credits StreamSide, Empty and Kaorus
function onUse(cid, item, fromPosition, itemEx, toPosition)
local name = getCreatureName(cid)
    -- if getPlayerStorageValue(cid,11551) < 1 then
        if getPlayerLevel(cid) > 1 then
            getPlayerStorageValue(cid, 11551)
            doSendAnimatedText(getPlayerPosition(cid), "Welcome!", TEXTCOLOR_RED) 
            doCreatureSay(cid, "CONGRATULATIONS! You are now a VIP for 15 days! You can now enter the VIP-area and use unique features!. ", TALKTYPE_ORANGE_1)
            doBroadcastMessage("CONGRATULATIONS " ..  name .. "! Now you are VIP for 15 days! Now you can enter the VIP-area and use unique features!")
            setPlayerStorageValue(cid, 11551, (getPlayerStorageValue(cid,11551) + 15))
            doRemoveItem(item.uid, 1)
        else
            doPlayerSendCancel(cid,"You need to be at least level 2 to use this.")
            doRemoveItem(item.uid, 1)
        end
    -- else
    --    doPlayerSendCancel(cid,"You are already a donator.")
    -- end    
return TRUE
end

Moja pro?ba:

Chce ?eby konto vip kupowa?o si? poprzez u?ycie komendy !buy"vip i ?eby kosztowa?o ono 250cc. Jest to mo?liwe? Je?li tak to prosze o szybka pomoc.

Pozdrawiam!
 
Odp: [7.92+] Firma poprawiaj?ca skrypty by Ovner & Gelio

Wersja tibii : 8.42

Silnik : TFS 0.3.4PL2

Tre?? b??du: Skrypt nie zabiera 10 many co 2 sek, jak sie ma np. 1200 hp to spada dp ustawionego w skrypcie np. 500, gdy mana spadnie ponizej 100 skrypt nie zmienia vocations i outfit ktory byl przed transem.
A w konsoli:
[15/06/2009 18:01:42] Lua Script Error: [Spell Interface]
[15/06/2009 18:01:42] data/spells/scripts/healing/transform.luaOnCastSpell

[15/06/2009 18:01:42] luaAddEvent(). Callback parameter should be a function.

Skrypt :
Kod:
second = 2 -- co ile ma sekund spadac ki
function goku(cid) ---Nie ruszac
if isPlayer(cid) == 1 then ---nie ruszac
if getPlayerVocation(cid) == 0 then ---nie ruszac	
if getPlayerMana(cid) >= 100 then ---ile many na transforma	
          doPlayerAddMana(cid,-10)                    
goku = addEvent(goku,1000,cid)
   	end
end
if getPlayerMana(cid) <= 100 then ---je?li player ma many	
       stopEvent(goku)
          setCreatureMaxHealth(cid, -500)
          setCreatureMaxMana(cid, -100)
            doPlayerSetVocation(cid,0) 
            doRemoveCondition(cid, 6)
   end
   end
end
function goku1(cid)   
if isPlayer(cid) == 1 then
if getPlayerVocation(cid) == 1 then	
if getPlayerMana(cid) >= 100 then	
          doPlayerAddMana(cid,-10)                    
goku1 = addEvent(goku1,1000,cid)
	end
end
if getPlayerMana(cid) <= 100 then	
       stopEvent(goku1)
          setCreatureMaxHealth(cid, -500)
          doPlayerAddManaMax(cid,-400)
            doPlayerSetVocation(cid,0) 
            doRemoveCondition(cid, 6)
   end
   end
end
function goku2(cid)
if isPlayer(cid) == 1 then
if getPlayerVocation(cid) == 2 then	
if getPlayerMana(cid) >= 100 then	
      doSendMagicEffect(getCreaturePosition(cid), 14)
          doPlayerAddMana(cid,-10)                   
goku2 = addEvent(goku2,1000,cid)
	end
end
if getPlayerMana(cid) <= 100 then	
       stopEvent(goku2)
          setCreatureMaxHealth(cid, -500)
          doPlayerAddManaMax(cid,-800)
            doPlayerSetVocation(cid,0) 
            doRemoveCondition(cid, 6)
   end
   end
end  
function goku3(cid)
if isPlayer(cid) == 1 then
if getPlayerVocation(cid) == 3 then	
if getPlayerMana(cid) >= 100 then	
      doSendMagicEffect(getCreaturePosition(cid), 14)
          doPlayerAddMana(cid,-10) 
      doSendMagicEffect(getCreaturePosition(cid), 14)                  
goku3 = addEvent(goku3,1000,cid)
	end
end
if getPlayerMana(cid) <= 100 then	
       stopEvent(goku3)
          setCreatureMaxHealth(cid, -500)
          setCreatureMaxMana(cid, 500)
            doPlayerSetVocation(cid,0) 
            doRemoveCondition(cid, 6)
   end
   end
end
function goku4(cid)
if isPlayer(cid) == 1 then
if getPlayerVocation(cid) == 3 then	
if getPlayerMana(cid) >= 100 then
      doSendMagicEffect(getCreaturePosition(cid), 181)	
          doPlayerAddMana(cid,-10)                   
goku4 = addEvent(goku4,second*1000,cid)
	end
end
if getPlayerMana(cid) <= 100 then	
       stopEvent(goku4)
          setCreatureMaxHealth(cid, -500)
          setCreatureMaxMana(cid, 500)
            doPlayerSetVocation(cid,0) 
            doRemoveCondition(cid, 6)
   end
   end
end
function goku5(cid)
if isPlayer(cid) == 1 then
if getPlayerVocation(cid) == 3 then	
if getPlayerMana(cid) >= 100 then	
      doSendMagicEffect(getCreaturePosition(cid), 180)
          doPlayerAddMana(cid,-10)                   
goku5 = addEvent(goku5,second*1000,cid)
	end
end
if getPlayerMana(cid) <= 100 then	
       stopEvent(goku5)
          setCreatureMaxHealth(cid, -500)
          setCreatureMaxMana(cid, 500)
            doPlayerSetVocation(cid,0) 
            doRemoveCondition(cid, 6)
   end
   end
end
function onCastSpell(cid, var)   
if getPlayerVocation(cid) == 5 then   ---je?li profa gracza
    if getPlayerLevel(cid) >= 250 then ----je?li level gracza
      doPlayerSetVocation(cid,6) ---ustawianie profy gracza
      doCreatureChangeOutfit(cid, {lookType=66})  ---Wygl?d gracza
      doSendMagicEffect(getCreaturePosition(cid), 60) ---Efekt przy transie
      setCreatureMaxHealth(cid, 500)
      setCreatureMaxMana(cid, 500)
goku5 = addEvent(goku5,second*1000,cid) 
else
doSendMagicEffect(getCreaturePosition(cid), 2)
doPlayerSendCancel(cid, "sorry you don't 250 lvl.") ---napis,je?li si? nie ma LV
end
end
if getPlayerVocation(cid) == 4 then	
    if getPlayerLevel(cid) >= 170 then
      doPlayerSetVocation(cid,5)
      doCreatureChangeOutfit(cid, {lookType=46}) 
      setCreatureMaxHealth(cid, 500)
      setCreatureMaxMana(cid, 500)
goku4 = addEvent(goku4,second*1000,cid) 
else
doSendMagicEffect(getCreaturePosition(cid), 2)
doPlayerSendCancel(cid, "sorry you don't 170 lvl.")
end
end 
if getPlayerVocation(cid) == 3 then	
    if getPlayerLevel(cid) >= 170 then
      doPlayerSetVocation(cid,4)
      doCreatureChangeOutfit(cid, {lookType=70}) 
      doSendMagicEffect(getCreaturePosition(cid), 59)
      setCreatureMaxHealth(cid, 200)
      setCreatureMaxMana(cid, 500)
goku3 = addEvent(goku3,second*1000,cid) 
else
doSendMagicEffect(getCreaturePosition(cid), 2)
doPlayerSendCancel(cid, "sorry you don't 170 lvl.")
end  
end
if getPlayerVocation(cid) == 2 then	
    if getPlayerLevel(cid) >= 140 then
      doPlayerSetVocation(cid,3)
      doCreatureChangeOutfit(cid, {lookType=71}) 
      doSendMagicEffect(getCreaturePosition(cid), 58)
      setCreatureMaxHealth(cid, 1200)
      setCreatureMaxMana(cid, 100)
goku2 = addEvent(goku2,second*1000,cid) 
else
doSendMagicEffect(getCreaturePosition(cid), 2)
doPlayerSendCancel(cid, "sorry you don't 140 lvl.")
end
end 
if getPlayerVocation(cid) == 1 then	
    if getPlayerLevel(cid) >= 80 then
      doPlayerSetVocation(cid,2)
      doCreatureChangeOutfit(cid, {lookType=18}) 
      doSendMagicEffect(getCreaturePosition(cid), 57)
      setCreatureMaxHealth(cid, 800)
      setCreatureMaxMana(cid, 600)
goku1 = addEvent(goku1,second*1000,cid) 
else
doSendMagicEffect(getCreaturePosition(cid), 2)
doPlayerSendCancel(cid, "sorry you don't 80 lvl.")
end  
end
if getPlayerVocation(cid) == 0 then	
    if getPlayerLevel(cid) >= 40 then
      doPlayerSetVocation(cid,1)
      doCreatureChangeOutfit(cid, {lookType=37}) 
      doSendMagicEffect(getCreaturePosition(cid), 56)
      setCreatureMaxHealth(cid, 500)
      setCreatureMaxMana(cid, 500)
goku = addEvent(goku,second*1000,cid) 
else
doSendMagicEffect(getCreaturePosition(cid), 2)
doPlayerSendCancel(cid, "sorry you don't 40 lvl.")
end
end
end
 
Odp: [7.92+] Firma poprawiaj?ca skrypty by Ovner & Gelio

Wersja : 8.0
Nazwa : Czep OTS 1.1.0
Blad : niema chce poprosic o dodanie scryptu zeby po uzyciu transform pokazywaly sie piorunki co secounde lub 2 .
Kod:
--Goku Ssj--
local mana = 100
local voce = 1 
local lvl = 30 
local voc = 2 
local pacc = 0 
local pacce = 1  
local outfit = {lookType=75,lookHead=0,lookAddons=0,lookLegs=0,lookBody=0,lookFeet=0} 
local outfitTime = 9000000 
local text = "Aaaah" 
local effect = 101 
--------------------------------koniec ustawien---------
----------------------kod-----------------------------
if(getPlayerMana(cid) >= mana and getPlayerVocation(cid) == voce and getPlayerLevel(cid) >= lvl and isPremium(cid) == pacc or isPremium(cid) == pacce and getPlayerVocation(cid) < voc )then
doPlayerSetVocation(cid,voc)
doPlayerAddMana(cid,-mana)
doSetCreatureOutfit(cid, outfit, outfitTime)
doPlayerSay(cid,text,16)
local pos = getPlayerPosition(cid)
doSendMagicEffect(pos,effect)
setPlayerStorageValue(cid,312,1)
setPlayerStorageValue(cid,5,getPlayerVocation(cid))
		else
doPlayerSendCancel(cid,"Dostosuj sie do wymagan.")
                end
          end
          return 1
    end
 
Ostatnia edycja:
Status
Zamknięty.
Do góry