Most visitors online was 8830 , on 6 Feb 2024
Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!
Join Today!I think the new main.dll mising option to switch to use wide screen, please check again SmileYzn
Sure, take your time
If possible, please also add:
- VIP package in cashshop
- Way to earn WCoin/Goblin Point from killing mobs (currently only earn Goblin Point from playing time)
Thanks,
if(lpProductInfo->ItemIndex == GET_ITEM(13,124))
{
switch(lpProductInfo->ItemIndex)
{
case GET_ITEM(13,124): // Paid Channel Access Ticket
{
GJAccountLevelSaveSend(lpObj->Index,lpProductInfo->ItemLevel,lpProductInfo->ItemDuration);
GJAccountLevelSend(lpObj->Index);
break;
}
}
}
Hi again bro, i found this code on GameServer (That i forgotten to mention here).
Code:if(lpProductInfo->ItemIndex == GET_ITEM(13,124)) { switch(lpProductInfo->ItemIndex) { case GET_ITEM(13,124): // Paid Channel Access Ticket { GJAccountLevelSaveSend(lpObj->Index,lpProductInfo->ItemLevel,lpProductInfo->ItemDuration); GJAccountLevelSend(lpObj->Index); break; } } }
To Buy VIP Plan in cashshop, you need only to put the "Paid Channel Access Ticket" in cashshop with your requisites.
And do not forget two things:
1. ItemLevel means Account Level (VIP Index in VipManager.txt);
2. Item Duration is equal the time of VIP plan for player;
I hope all can now buy VIP plans correctly..
Great bro, so it’s all coded. I will try and let you know.
But in future time, u still add in the method to earn WCoin right? Currently I can only got it from Reset.
Did you forgotten LUA script system ??
function OnMonsterDie(aIndex,bIndex)
Use your imagination bro, i guess is not necessary a new system for now.
:junglejane:
Bro, the VIP package work well.
On the LUA script, can you share some hint?
require("MonsterBonus")
MonsterDieBonus(aIndex,bIndex)
function MonsterDieCustomBonus(PlyerIndex,MonsterIndex)
-- Points
local WCoinC = 0
local WCoinP = 0
local GPoint = 0
-- Get Victim Monster Class
local MonsterClass = GetObjectClass(MonsterIndex)
-- Kundun Demon (10 WcoinC) (Repeat with a different Monster id)
if(MonsterClass == 275) then
WCoinC = WCoinC + 10
end
-- If any points is given, then send to CashShop
if((WCoin > 0) or (WCoinP > 0) or (GPoint > 0)) then
CashShopAddPoint(PlyerIndex,WCoinC,WoinP,GPoint)
end
end
hint ?
1. Put require at Main.Lua
Code:require("MonsterBonus")
2. At OnMonsterDiem put call to function
Code:MonsterDieBonus(aIndex,bIndex)
3. Put this at MonsterBonus.lua file and save into Scripts folder
Code:function MonsterDieCustomBonus(PlyerIndex,MonsterIndex) -- Points local WCoinC = 0 local WCoinP = 0 local GPoint = 0 -- Get Victim Monster Class local MonsterClass = GetObjectClass(MonsterIndex) -- Kundun Demon (10 WcoinC) (Repeat with a different Monster id) if(MonsterClass == 275) then WCoinC = WCoinC + 10 end -- If any points is given, then send to CashShop if((WCoin > 0) or (WCoinP > 0) or (GPoint > 0)) then CashShopAddPoint(PlyerIndex,WCoinC,WoinP,GPoint) end end
Ps. Not Tested
function OnMonsterDie(aIndex,bIndex)
-----------------------------------------
-- Called after a monster dies.
-- aIndex = Monster index (victim).
-- bIndex = User index (killer).
-----------------------------------------
ScriptLoader_OnMonsterDie(aIndex,bIndex)
-----------------------------------------
-- Call the function of MonsterBonus.lua
MonsterDieBonus(aIndex,bIndex)
end
SmileYzn, it doesn't works anyway.Yes, need
into Main.lua, and here is the script:require("MonsterBonus")
function MonsterDieBonus(PlayerIndex,MonsterIndex)
-- Points
local WCoinC = 0
local WCoinP = 0
local GPoint = 0
-- Get Victim Monster Class
local MonsterClass = GetObjectClass(MonsterIndex)
-- Spider (10 WcoinC) (Repeat with a different Monster id)
if(MonsterClass == 3) then
WCoinC = WCoinC + 10
end
-- If any points is given, then send to CashShop
if((WCoin > 0) or (WCoinP > 0) or (GPoint > 0)) then
CashShopAddPoint(PlayerIndex,WCoinC,WoinP,GPoint)
end
end
function OnMonsterDie(aIndex,bIndex)
-----------------------------------------
-- Called after a monster dies.
-- aIndex = Monster index (victim).
-- bIndex = User index (killer).
-----------------------------------------
ScriptLoader_OnMonsterDie(aIndex,bIndex)
-----------------------------------------
-- Call the function of MonsterBonus.lua
MonsterDieBonus(PlayerIndex,MonsterIndex)
end
orMonsterDieBonus(PlayerIndex,MonsterIndex)
don't work.MonsterDieBonus(aIndex,bIndex)
anyone have maker of this release? what is the compatible maker of this server files?
function OnMonsterDieBonus(MonsterIndex,PlayerIndex)
-- Result false until some monster death
local Result = false
-- Get Monster Class
local MonsterClass = GetObjectClass(MonsterIndex)
-- Kundun Demon
if(MonsterClass == 275) then
Result = true
CashShopAddPoint(PlayerIndex,300,0,0)
NoticeSendToAll(0,string.format("%s killed %s",GetObjectName(PlayerIndex),GetObjectName(MonsterIndex)))
end
-- If any points is given, then a crappy effect
if Result ~= false then
FireworksSend(PlayerIndex,GetObjectX(PlayerIndex),GetObjectY(PlayerIndex))
end
end
ScriptLoader_AddOnMonsterDie("OnMonsterDieBonus")