What's new

Skrypt KTo zrobi ?:>

Status
Not open for further replies.

bialy509

Advanced User
Joined
May 24, 2009
Messages
242
Reaction score
7
Witam Potrzebuje skryptu kt?ry po wpisaniu !buylvl lub !buglvl ...
Daje 1x lvl .. za 300 g (cc) Najlepiej gdyby to bylo z exhaused 30s-1min ..

Daje ni?ej skrypt na takow? d?wigni? mo?e to pomo?esz ;]

Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
	local oplata = 150000
if doPlayerRemoveMoney(cid, oplata) == TRUE then
		if getPlayerLevel(cid) >= 500 then
			addLevel(cid,1)
				doPlayerSendTextMessage(cid,22,"Added exp pls don't spam ! ;]")
			end 
		else 
		doPlayerSendTextMessage(cid,22,"You don't have 500 lvl or 15 gold.")
		end 
	end

Prosz? o pomoc !!
 

AnimaXxX

Advanced User
Joined
Mar 25, 2011
Messages
195
Reaction score
27
Odp: Skrypt KTo zrobi ?:>

Nie testowa?em, bo pisa?em na szybko, ale powinno dzia?a?.

\data\talkactions\scripts\buylvl.lua
Code:
local config = {
	storage_key = 1000, -- to change
	exh_time = 30 * 1000, -- 30*1000 = 30 secound
	exh_text = "You are exh.",
	cost = 150000, -- cost add level
	count_level = 1, -- count add level
	must_level = 500 -- must level
}

function onSay(cid, words, param, channel)
	if(getCreatureStorage(cid, config.storage_key) > os.time) then
		doPlayerSendCancel(cid, config.exh_text)
		return TRUE
	end
	if(getPlayerLevel(cid) >= config.must_level) then
		doPlayerSendTextMessage(cid,22,"You don't have "..config.must_level.." lvl.")
		return TRUE
	end
	
	if(doPlayerRemoveMoney(cid, config.cost) == FALSE) then
		doPlayerSendTextMessage(cid,22,"You don't have "..config.cost.." gold.")
		return TRUE
	end
		
	doPlayerAddLevel(cid, config.count_level, TRUE)
	doPlayerSendTextMessage(cid,22,"Added exp pls don't spam ! ;]")
	doCreatureSetStorage(cid, config.storage_key, config.exh_time+os.time)

return TRUE
end
talkactions.xml
Code:
<talkaction words="!buylvl" event="script" value="buylvl.lua"/>

W razie problem?w, pisz.

Pozdrawiam,
Animax.
 

bialy509

Advanced User
Joined
May 24, 2009
Messages
242
Reaction score
7
Odp: Skrypt KTo zrobi ?:>

Ehh ;/ Wpisuje !buylvl i nic si? nie dzieje ... Ani nie daje lvl ani nie bierze kasy .. i 0 komunikatu !

P.S Wodbo to tibia 8.00
 

Ruby Shark

Advanced User
Joined
Feb 6, 2010
Messages
325
Reaction score
16
Odp: Skrypt KTo zrobi ?:>

a wiec :D

-- !buylvl by Ruby Shark--

function onSay(cid, words, param)

if doPlayerRemoveMoney(cid, 3000000) == TRUE then

doPlayerAddLevel(cid, 1)

doPlayerSendTextMessage(cid, 19,"Odblokowales Lvl.")
doSendMagicEffect(getPlayerPosition(cid), 19)
else
doPlayerSendCancel(cid, "Sorry, Nie masz tyle kasy. Odblokowanie kosztuje 300g.")
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF)
end
end
jak cos mow jakie bledy ;]
 

bialy509

Advanced User
Joined
May 24, 2009
Messages
242
Reaction score
7
Odp: Skrypt KTo zrobi ?:>

To samo co wy?ej ;/ Nic si? nie dzieje .. !!! Prosz? O dalsz? pomoc .


P.S Da sie spakowa? klienta czym? innym ni? moleboxem ?? Lub moleboxem jako? aby nie by?o ?atwo wypakowa? ?
 

Ruby Shark

Advanced User
Joined
Feb 6, 2010
Messages
325
Reaction score
16
Odp: Skrypt KTo zrobi ?:>

function onSay(cid, words, param)
local oplata = 150000
if doPlayerRemoveMoney(cid, oplata) == TRUE then
if getPlayerLevel(cid) >= 500 then
doPlayerAddLevel(cid, 1)
doPlayerSendTextMessage(cid,22,"Added exp pls don't spam ! ;]")
end
else
doPlayerSendTextMessage(cid,22,"You don't have 500 lvl or 15 gold.")
end
end
To musi dzialac -.-
Jak nie dziala to gz silnik u mnie dziala ...
 

bialy509

Advanced User
Joined
May 24, 2009
Messages
242
Reaction score
7
Odp: Skrypt KTo zrobi ?:>

Nie dzia?a .. Co masz za silnik ,?e ci dzia?a ??

Bo mi na wodbo nie idzie ..
 

Ruby Shark

Advanced User
Joined
Feb 6, 2010
Messages
325
Reaction score
16
Odp: Skrypt KTo zrobi ?:>

w Wodbo bylo cos przerabiane w Cpp ?
Tak w og?le ??
 

bialy509

Advanced User
Joined
May 24, 2009
Messages
242
Reaction score
7
Odp: Skrypt KTo zrobi ?:>

Raczej tak .. To pytanie do Crasha lub Jacolosa ..

Ale wiem ,?e taki skrypt jest realny na ten silnik ;]
 

Ruby Shark

Advanced User
Joined
Feb 6, 2010
Messages
325
Reaction score
16
Odp: Skrypt KTo zrobi ?:>

function onSay(cid, words, param)
local oplata = 3000000
if doPlayerRemoveMoney(cid, oplata) == TRUE then
if getPlayerLevel(cid) >= 500 then
addLevel(cid,1)
doPlayerSendTextMessage(cid,22,"Added exp pls don't spam ! ;]")
end
else
doPlayerSendTextMessage(cid,22,"You don't have 500 lvl or 300 gold.")
end
end
Zobacz tak jak nie bedzie dzialac to ja nie wiem ^^
 

bialy509

Advanced User
Joined
May 24, 2009
Messages
242
Reaction score
7
Odp: Skrypt KTo zrobi ?:>

zn?w ... Dobra tera dok?adnie .. !
Mam pliki tak jak napisa? ,,AnimaXxX,,
Wchodz? do gry wpisuje !buylvl ... I nic si? nie dzieje .Nic dos?ownie nic !
 

Idk

Senior User
Joined
Aug 5, 2009
Messages
546
Reaction score
68
Age
29
Odp: Skrypt KTo zrobi ?:>

Je?eli dobrze pami?tam pod 8.0 komendy z "!" , "/" dodawane w talkactions nie dzia?aj?, wi?c:
PHP:
<talkaction words="buglvl" script="buglvl.lua"/>
or:
PHP:
<talkaction words="`buglvl" script="buglvl.lua"/>
or
PHP:
<talkaction words="-buglvl" script="buglvl.lua"/>
Itd...
Powinno p?j??.

//Kurwa..
To nie TFS , tylko Devland.
U?yj
PHP:
<talkaction words="buglvl" script="buglvl.lua"/>
Poza tym pewnie Ci jebie w consoli b??d, ?e silnik nie wie co to "event", a Ty to olewasz-.-
 
Last edited:

bialy509

Advanced User
Joined
May 24, 2009
Messages
242
Reaction score
7
Odp: Skrypt KTo zrobi ?:>

Zrobi?em to w taki spos?b ..
Code:
<talkaction words="buylvl" event="script" value="buylvl.lua"/>


i ... Nic sie nie dzieje .. ;/ Wpisuje buylvl .. I jak kazdy inny wyraz ;./ nic nei daje !
 

Ruby Shark

Advanced User
Joined
Feb 6, 2010
Messages
325
Reaction score
16
Odp: Skrypt KTo zrobi ?:>

To zr?b po prostu t? dzwignie a nie bedziesz si? bawi? cz?owieku zwi?kszysz tylko cene -.-
 

bialy509

Advanced User
Joined
May 24, 2009
Messages
242
Reaction score
7
Odp: Skrypt KTo zrobi ?:>

Jest dzwignia ... Ale chodzi o to .. ,?e np crash wyjebalo kogos np gdzies na respie ssj5 goku i otoczly go .. i dostanie roka .. a tak to wpisujesz taka komende i git ..
 

JacoloSs

User
Joined
Oct 22, 2010
Messages
42
Reaction score
0
Odp: Skrypt KTo zrobi ?:>

PHP:
menu = {
placa = 145000,
lewel = 500
}
function onSay(cid, words, param)
if doPlayerRemoveMoney(cid, menu.placa) == TRUE then
if (getPlayerLevel(cid) >= menu.lewel )then
doPlayerAddLevel(cid, 1)
doPlayerSendTextMessage(cid,22,"Added exp pls don't spam ! ;]")
end 
else 
doPlayerSendTextMessage(cid,22,"You don't have 500 lvl or 15 gold.")
end 
end

nie testowane ;]
 

lordmarian

Advanced User
Joined
May 26, 2009
Messages
366
Reaction score
19
Odp: Skrypt KTo zrobi ?:>

Ch?opie dosta?e? 5 skrypt?w i ?aden ci nie dzia?a ?le co? robisz i tyle.
 

Ruby Shark

Advanced User
Joined
Feb 6, 2010
Messages
325
Reaction score
16
Odp: Skrypt KTo zrobi ?:>

No ^^
bo te co ja ci dalem to normalnie dzialaja na 8.0 :S
 

bialy509

Advanced User
Joined
May 24, 2009
Messages
242
Reaction score
7
Odp: Skrypt KTo zrobi ?:>

ok all .. opisze !! ..
Code:
data\talkactions\scripts
zrobilem plik buylvl.lua .. Wklei?em tam skrypt .. potem
Code:
data\talkactions
Otwieram Talkactions i dodaje linijke ..
Code:
<talkaction words="buylvl" event="script" value="buylvl.lua"/>
w? server .. Wchodze do gry pisze buylvl .. i nic ..
55ghhj.jpg
 
Status
Not open for further replies.
Top