//include'lerin olduğu bölüme ekle;
#ifdef ENABLE_DICE_SYSTEM
#include "party.h"
#endif
//arat;
ALUA(game_drop_item_with_ownership)
//fonksiyondan sonra ekle;
#ifdef ENABLE_DICE_SYSTEM
ALUA(game_drop_item_with_ownership_and_dice)
{
LPITEM item = NULL;
switch (lua_gettop(L))
{
case 1:
item = ITEM_MANAGER::instance().CreateItem((DWORD)lua_tonumber(L, 1));
break;
case 2:
case 3:
item = ITEM_MANAGER::instance().CreateItem((DWORD)lua_tonumber(L, 1), (int)lua_tonumber(L, 2));
break;
default:
return 0;
}
if (item == NULL)
{
return 0;
}
LPCHARACTER ch = CQuestManager::instance().GetCurrentCharacterPtr();
if (ch->GetParty())
{
FPartyDropDiceRoll f(item, ch);
f.Process(NULL);
}
if (lua_isnumber(L, 3))
{
int sec = (int)lua_tonumber(L, 3);
if (sec <= 0)
{
item->SetOwnership(ch);
}
else
{
item->SetOwnership(ch, sec);
}
}
else
item->SetOwnership(ch);
PIXEL_POSITION pos;
pos.x = ch->GetX() + number(-200, 200);
pos.y = ch->GetY() + number(-200, 200);
item->AddToGround(ch->GetMapIndex(), pos);
item->StartDestroyEvent();
return 0;
}
#endif
//tekrar arat;
{ "drop_item_with_ownership", game_drop_item_with_ownership },
//altına ekle;
#ifdef ENABLE_DICE_SYSTEM
{ "drop_item_with_ownership_and_dice", game_drop_item_with_ownership_and_dice },
#endif
Replies to Re: Re: Untitled
{"html5":"htmlmixed","css":"css","javascript":"javascript","php":"php","python":"python","ruby":"ruby","lua":"text\/x-lua","bash":"text\/x-sh","go":"go","c":"text\/x-csrc","cpp":"text\/x-c++src","diff":"diff","latex":"stex","sql":"sql","xml":"xml","apl":"apl","asterisk":"asterisk","c_loadrunner":"text\/x-csrc","c_mac":"text\/x-csrc","coffeescript":"text\/x-coffeescript","csharp":"text\/x-csharp","d":"d","ecmascript":"javascript","erlang":"erlang","groovy":"text\/x-groovy","haskell":"text\/x-haskell","haxe":"text\/x-haxe","html4strict":"htmlmixed","java":"text\/x-java","java5":"text\/x-java","jquery":"javascript","mirc":"mirc","mysql":"sql","ocaml":"text\/x-ocaml","pascal":"text\/x-pascal","perl":"perl","perl6":"perl","plsql":"sql","properties":"text\/x-properties","q":"text\/x-q","scala":"scala","scheme":"text\/x-scheme","tcl":"text\/x-tcl","vb":"text\/x-vb","verilog":"text\/x-verilog","yaml":"text\/x-yaml","z80":"text\/x-z80"}