Zorke
-
Posts
28 -
Joined
-
Last visited
-
Feedback
0%
Content Type
Forums
Store
Third Party - Providers Directory
Feature Plan
Release Notes
Docs
Events
Posts posted by Zorke
-
-
it's just a function everyone uses what they want
-
Hello, i give you a function that helps you check the empty space in ItemSHOP.
Here is a video shows that it works
public function checkPosition($newsize){ $slot=array( "0" => 0, "1" => 0, "2" => 0, "3" => 0, "4" => 0, "5" => 0, "6" => 0, "7" => 0, "8" => 0, "9" => 0, "10" => 0, "11" => 0, "12" => 0, "13" => 0, "14" => 0, "15" => 0, "16" => 0, "17" => 0, "18" => 0, "19" => 0, "20" => 0, "21" => 0, "22" => 0, "23" => 0, "24" => 0, "25" => 0, "26" => 0, "27" => 0, "28" => 0, "29" => 0, "30" => 0, "31" => 0, "31" => 0, "32" => 0, "33" => 0, "34" => 0, "35" => 0, "36" => 0, "37" => 0, "38" => 0, "39" => 0, "40" => 0, "41" => 0, "42" => 0, "43" => 0, "44" => 0, ); $own_id=$_SESSION['user_id']; $sql = "SELECT item.pos,item_proto.size AS item_size FROM player.item INNER JOIN player.item_proto ON item_proto.vnum=item.vnum WHERE item.owner_id=? AND item.window=?"; $stmt = $this->o_db->prepare($sql); $stmt->execute(array($own_id,"MALL")); $result =$stmt->FetchAll(); $nextposition = 0; foreach($result as $exist){ $replace = array($exist['pos'] => 1); $slot = array_replace( $slot, $replace); if($exist['item_size'] == '2'){ $replace2 = array($exist['pos']+5=>1); $slot = array_replace( $slot, $replace2); } if($exist['item_size'] == '3'){ $replace3 = array($exist['pos']+5=>1,$exist['pos']+10=>1); $slot = array_replace( $slot, $replace3); } } for($zorke=0;$zorke<=44;$zorke++){ if($newsize == '1'){ if($slot[$zorke] == '0'){ $nextposition = $zorke; $zorke = 45; } if($zorke == 44) { $nextposition = 45; $zorke = 45; } } if($newsize == '2'){ if($slot[$zorke] == '0' && $slot[$zorke+5] == '0' ){ $nextposition = $zorke; $zorke = 45; } if($zorke == 40){ $nextposition = 45; $zorke = 45; } } if($newsize == '3'){ if($slot[$zorke] == '0' && $slot[$zorke+5] == '0' && $slot[$zorke+10] == '0'){ $nextposition = $zorke; $zorke = 45; } if($zorke == 35){ $nextposition = 45; $zorke = 45; } } } return $nextposition; }
01.The function returns the next free position .. it is perfectly functional on all 3 sizes. You will need to do (or integrate) a function that will receive the size of the item in itemshop, each as done by itemshop.
02.To call her use $this->checkPosition($variabilă), where does it say variabilă you have to put the size of the item, if you do not use classes the function is called directly checkPosition($variabilă).
03.The db connection must be pdo.
04. This line $nextposition = 45; in my buyitem function I made the condition that if it is greater than or equal to 45 to display the message that there are too many items and has the inventory full.
All the best,
Zorke.- 1
-
Hello i have a problem with 2 effect view this picture
I don't know how to remove a flag if the vip is active..
i have in instancebase.cpp this:
Spoiler#ifdef __KOTOBA_VIP__
BOOL CInstanceBase::IsVIP()
{
if (m_kAffectFlagContainer.IsSet(AFFECT_VIP))
return true;
return false;
}
#endifBOOL CInstanceBase::IsSameEmpire(CInstanceBase& rkInstDst)
{
if (0 == rkInstDst.m_dwEmpireID)
return TRUE;if (IsGameMaster())
return TRUE;
#ifdef __KOTOBA_VIP__
if (IsVIP())
return TRUE;
#endif
if (rkInstDst.IsGameMaster())
return TRUE;
if (rkInstDst.m_dwEmpireID==m_dwEmpireID)
return TRUE;
#ifdef __KOTOBA_VIP__
if (rkInstDst.IsVIP())
return TRUE;
#endifin instancebaseeffect.cpp this
Spoilerif (pkInstMain->IsGameMaster())
{
}
#ifdef __KOTOBA_VIP__
else if (pkInstMain->IsVIP())
{
}
#endif
else
{
and
if (IsGameMaster())
return;
#ifdef __KOTOBA_VIP__
if (IsVIP())
return;
#endifand
#ifdef __KOTOBA_VIP__
case AFFECT_VIP:
if (IsAffect(AFFECT_INVISIBILITY))
return;
break;
#endifAFF_VIP is 42.. how to resolve this?? help me please
Best regards,
Zorke.
-
when i use the chinese fireworks the vip automatic is displayed .. how to change that?
-
-
I changed the base platform , now i working on the fliege, T/C.
-
-
Hello i have a problem with clean client zearth (cartof v4) , when I entered the game with another character and then I change the character , then press create the character takes me out of the client in syserr does not show anything, and I do not know where the problem can come from does anyone know?
EDIT: if i press create the character and i don't enter the game it's work correctly..
EDIT2: after that ErrorLog.txt it is created
Sorry for English . Best regards,
Zorke.
-
Hello.. i have a problem with mount.. i implement the mount_costume, and i put real_time to mount , and a question but when i climb the mount immediately get me down .. but i have 20 days time.. and i don't know where is the problem.. in my source or where?
If i put type item_quest it summon the mount and don't get me down but the mount doesn't put in slot mount_costume.
if i change the type in item_costume and subtype mount_costume he puts in their slot but get me down from mount.
-
15 hours ago, Dobrescu Sebastian said:
Client item_proto must have REAL_TIME
and how to implement this.. i don't know..
-
Hello .. i have a problem with time 0 on type COSTUME_MOUNT, i don't know why.. i have this question for mount,
quest ride begin state start begin function Ride( vnum, remain_time ) ride_info = { [71114] = { 20110, 5*60, apply.DEF_GRADE_BONUS, 75, 75, false }, [71115] = { 20110, 5*60, apply.DEF_GRADE_BONUS, 100, 75, false }, [71116] = { 20111, 5*60, apply.DEF_GRADE_BONUS, 100, 80, false }, [71117] = { 20111, 5*60, apply.DEF_GRADE_BONUS, 150, 80, false }, [71118] = { 20112, 5*60, apply.DEF_GRADE_BONUS, 125, 85, false }, [71119] = { 20112, 5*60, apply.DEF_GRADE_BONUS, 200, 85, false }, [71120] = { 20113, 5*60, apply.ATT_GRADE_BONUS, 200, 85, false }, [71121] = { 20113, 5*60, apply.ATT_GRADE_BONUS, 300, 85, false }, [71171] = { 20227, 5*60, apply.ATTBONUS_MONSTER, 20, 1, false, false, false}, [71172] = { 20226, 5*60, apply.ATTBONUS_MONSTER, 20, 1, false, false, false}, [52106] = { 20228, 5*60, apply.ATTBONUS_ANIMAL, 4, 1, false, false, false}, [52107] = { 20228, 5*60, apply.EXP_DOUBLE_BONUS, 3, 1, false, false, false}, [52108] = { 20228, 5*60, apply.MAX_HP, 300, 1, false, false, false}, [52109] = { 20228, 5*60, apply.DEX, 70, 1, false, false, false}, [52110] = { 20228, 5*60, apply.STR, 60, 1, false, false, false}, [52111] = { 20229, 5*60, apply.ATTBONUS_ANIMAL, 3, 1, false, false, false}, [52112] = { 20229, 5*60, apply.EXP_DOUBLE_BONUS, 3, 1, false, false, false}, [52113] = { 20229, 5*60, apply.MAX_HP, 250, 1, false, false, false}, [52114] = { 20229, 5*60, apply.DEX, 50, 1, false, false, false}, [52115] = { 20229, 5*60, apply.STR, 30, 1, false, false, false}, [52116] = { 20230, 5*60, apply.ATTBONUS_ANIMAL, 5, 1, false, false, false}, [52117] = { 20230, 5*60, apply.EXP_DOUBLE_BONUS, 5, 1, false, false, false}, [52118] = { 20230, 5*60, apply.MAX_HP, 500, 1, false, false, false}, [52119] = { 20230, 5*60, apply.DEX, 150, 1, 1, false, false, false}, [52120] = { 20230, 5*60, apply.STR, 100, 1, false, false, false}, [71161] = { 20219, 5*60, apply.STR, 100, 1, false, false, false}, [71124] = { 20114, 5*60, apply.MOV_SPEED, 0, 1, false }, [71125] = { 20115, 5*60, apply.ATTBONUS_MONSTER, 20, 20, false }, [71126] = { 20116, 5*60, apply.ATTBONUS_MONSTER, 20, 20, false }, [71127] = { 20117, 5*60, apply.ATTBONUS_MONSTER, 20, 20, false }, [71128] = { 20118, 5*60, apply.ATTBONUS_MONSTER, 20, 20, false }, [71137] = { 20120, 5*60, apply.MOV_SPEED, 0, 1, false, false, false}, [71138] = { 20121, 5*60, apply.MOV_SPEED, 0, 1, false, false, false}, [71139] = { 20122, 5*60, apply.MOV_SPEED, 0, 1, false, false, false}, [71140] = { 20123, 5*60, apply.MOV_SPEED, 0, 1, false, false, false}, [71141] = { 20124, 5*60, apply.MOV_SPEED, 0, 1, false, false, false}, [71142] = { 20125, 5*60, apply.MOV_SPEED, 0, 1, false, false, false}, [71176] = { 20231, 5*60, apply.MOV_SPEED, 30, 1, false, false, false}, [71177] = { 20232, 5*60, apply.MOV_SPEED, 30, 1, false, false, false}, [71131] = { 20119, 5*60, apply.MOV_SPEED, 60, 1, false }, [71132] = { 20119, 5*60, apply.MOV_SPEED, 60, 1, false }, [71133] = { 20119, 5*60, apply.MOV_SPEED, 60, 1, false }, [71134] = { 20119, 5*60, apply.ATTBONUS_MONSTER, 20, 1, false }, [71161] = { 20219, 5*60, apply.ATTBONUS_MONSTER, 20, 1, false }, } if pc.level < ride_info[vnum][5] then syschat("Your level is too low to use this mount.") else if ride_info[vnum][2] == 0 and remain_time != 0 then pc.mount( ride_info[vnum][1], remain_time*60 ) pc.mount_bonus( ride_info[vnum][3], ride_info[vnum][4], remain_time*60 ) else pc.mount( ride_info[vnum][1], ride_info[vnum][2] ) pc.mount_bonus( ride_info[vnum][3], ride_info[vnum][4], ride_info[vnum][2] ) end if true == ride_info[vnum][6] then pc.remove_item(vnum, 1) end end end when login begin local vnum, remain_time = pc.get_special_ride_vnum() if 0 != vnum then ride.Ride(vnum, remain_time) end end when 71114.use or 71115.use or 71116.use or 71117.use or 71118.use or 71119.use or 71120.use or 71121.use or 71124.use or 71125.use or 71126.use or 71127.use or 71128.use or 71131.use or 71132.use or 71133.use or 71134.use or 71161.use or 71137.use or 71138.use or 71139.use begin if pc.is_polymorphed() then syschat("You can´t ride if you´re polymorphed!") elseif false == pc.is_riding() then if true == horse.is_summon() then horse.unsummon() end ride.Ride(item.vnum, 0) else pc.unmount() end end when 52001.use or 52002.use or 52003.use or 52004.use or 52005.use or 52006.use or 52007.use or 52008.use or 52009.use or 52010.use or 52011.use or 52012.use or 52013.use or 52014.use or 52015.use or 52016.use or 52017.use or 52018.use or 52019.use or 52020.use or 52021.use or 52022.use or 52023.use or 52024.use or 52025.use or 52026.use or 52027.use or 52028.use or 52029.use or 52030.use or 52031.use or 52032.use or 52033.use or 52034.use or 52035.use or 52036.use or 52037.use or 52038.use or 52039.use or 52040.use or 52041.use or 52042.use or 52043.use or 52044.use or 52045.use or 52046.use or 52047.use or 52048.use or 52049.use or 52050.use or 52051.use or 52052.use or 52053.use or 52054.use or 52055.use or 52056.use or 52057.use or 52058.use or 52059.use or 52060.use or 52061.use or 52062.use or 52063.use or 52064.use or 52065.use or 52066.use or 52067.use or 52068.use or 52069.use or 52070.use or 52071.use or 52072.use or 52073.use or 52074.use or 52075.use or 52076.use or 52077.use or 52078.use or 52079.use or 52080.use or 52081.use or 52082.use or 52083.use or 52084.use or 52085.use or 52086.use or 52087.use or 52088.use or 52089.use or 52090.use or 71164.use or 52091.use or 52092.use or 52093.use or 52094.use or 52095.use or 52096.use or 52097.use or 52098.use or 52099.use or 52100.use or 52101.use or 52102.use or 52103.use or 52104.use or 52105.use begin if pc.is_polymorphed() then syschat("You can´t ride if you´re polymorphed!") elseif false == pc.is_riding() then if true == horse.is_summon() then horse.unsummon() end ride.Ride(item.vnum, 0) else pc.unmount() end end end end
and i changed value0 in 0.. and when I want to climb the mount I get down because of time i guess.. can you help me please..
-
This code where twice!
def GetInputValue(self):
net.SendQuestInputStringPacket(str(constInfo.VID))i have tombola and his use the same def getinputvalue.. i don't know how to resolve this
-
Hello i implement this system https://metin2dev.org/board/index.php?/topic/592-opponents-hp-and-mp-during-pvp/ .
And i have one problem with this.. everythings it's ok but the hp and stamina is not of his opponent .. it's your hp and stamina (look in picture) Everyone have idea how to resolve this? Please help me!
-
Hello , my polymorph 4 don't work .. i have a ring with change race , but the ninja or shaman or sura work .. it's ok, but when i select warrior option don't work .. i try this /polymorph 4 don't work .. quest it's ok.. it's work another svf .. but when i create a character warrior work ..
how do i solve this problem??Sorry for my english!
Best regards,
Zorke.
-
Up .. nimeni nu stie bugul la negot ?
-
-
-
UP nobody ?? Please this is a critical bug.. .
-
8 hours ago, kimameixede said:
you have all libs on click side?
i don't know where to watch .. where to watch this libs?
EDIT: I think i have all libs.. but can you specify the folder or the libs to watch?
-
Up, nobody??
-
Replace with
bool CExchange::AddGold(unsigned long long gold) { if (gold <= 0) return false; if (GetOwner()->GetGold() < gold) { // 가지고 있는 돈이 부족. exchange_packet(GetOwner(), EXCHANGE_SUBHEADER_GC_LESS_GOLD, 0, 0, NPOS, 0); return false; } if ( LC_IsCanada() == true || LC_IsEurope() == true ) { if ( m_lGold > 0 ) { return false; } } Accept(false); GetCompany()->Accept(false); m_lGold = gold; exchange_packet(GetOwner(), EXCHANGE_SUBHEADER_GC_GOLD_ADD, true, m_lGold, NPOS, 0); exchange_packet(GetCompany()->GetOwner(), EXCHANGE_SUBHEADER_GC_GOLD_ADD, false, m_lGold, NPOS, 0); return true; }
-
UP .. nobody?
-
UP, how i fix the exchange bug??
-
5 hours ago, kimameixede said:
its easy.
just check the line error on demirvidgame.lua
i fix it.. i add in questlib.lua this
function setvarchar(name, var)
local laenge = string.len (var)
local setchar = 0
local save_name = 0
local letter = 0
while laenge > setchar do
setchar = setchar + 1
letter = string.sub (var, setchar, setchar)
letter = string.byte(letter, 1)
save_name = ""..name.."_char_"..setchar..""
pc.setqf(save_name, letter)
end
local save_laenge=""..name.."laenge"
pc.setqf(save_laenge, laenge)
end
function getvarchar(name)
local save_laenge = ""..name.."laenge"
local laenge = pc.getqf(save_laenge)
local save_name = 0
local var = ""
local letter = 0
local getchar = 0
while laenge > getchar do
getchar = getchar + 1
save_name = ""..name.."_char_"..getchar..""
letter = pc.getqf(save_name)
if letter!=0 then
letter = string.char(letter)
else
letter = ""
end
var = ""..var..""..letter..""
end
return var
endBut, change how i fix it ?
I looking for xxhash.lib
in Paid Support / Searching / Recruiting
Posted
Does anyone have xxhash.lib? or source with sln..
Thank you,
Zorke.