Jump to content
Sign in to follow this  
WVWMK

[Скрипт]Выпадение валюты за смерть мобов

Recommended Posts

 

 

exp_and_level.lua
function GetExp_PKM( dead , atk  )
...

--Голд
local map_name = GetChaMapName ( atk )-- получаем карту
if map_name == "garner" or map_name == "magicsea" or map_name == "darkblue" then   -- если персонаж на картах Аскарон бла бла бла 
		local lv_mob = Lv(dead) -- получаем лвл моба
		local Money = 1 -- объявляем переменную
		if		lv_mob > 1 and lv_mob<=10 then --если уровень моба с 1 по 10, то
			Money = math.random(1,30) -- мы получим от 1 до 30 монет
		elseif lv_mob > 11 and lv_mob<=20 then
			Money = math.random(1,100)
		elseif lv_mob > 21 and lv_mob<=30 then
			Money = math.random(1,300)
		elseif lv_mob > 31 and lv_mob<=40 then
			Money = math.random(1,500)
		elseif lv_mob > 41 and lv_mob<=50 then
			Money = math.random(1,700)
		elseif lv_mob > 51 and lv_mob<=60 then
			Money = math.random(1,900)
		elseif lv_mob > 61 and lv_mob<=70 then
			Money = math.random(1,1200)
		elseif lv_mob > 71 and lv_mob<=80 then
			Money = math.random(1,1500)
		end
				local Nulle = 0
				AddMoney ( atk, Nulle , Money ) -- выдаем валюту
   ...                                      
end

Проверки можно усложнять выпадение вещей будет зависеть от уровня персонажа и прочего.


Делай добро и бросай его в воду

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...