• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Modyfikacja funkcji onMoveItem

Pawcio6

Member
Joined
Sep 26, 2009
Messages
143
Solutions
4
Reaction score
15
Siema
Mam problem od paru dni z ta funkcja http://otland.net/threads/creatureevent-onmove-very-advanced.134016/ przy tym skrypcie
Code:
function onMoveItem(cid, item, fromPosition, toPosition, fromItem, toItem, fromGround, toGround, status)
if item.itemid == 10148 then
if toItem.itemid ~= 9610 then
doPlayerSendCancel(cid, "You can move this item only to special container.")
return false
end
end
return true
end
gdy probuje przeniesc item do tego special bp upuszczajac item na nim(tak aby automatycznie przenioslo item do tego bp) to wyskakuje "you can move...".Skrypt dziala tylko jak otworzysz bp i przesuniesz item na jakies miejsce w nim. Gdy przenosisz jakis item do zamknietego bp to toItem zwraca zamiast tego bp to ten w ktorym znajduje sie ten zamkniety , a majac pierwszy bp w ktorym znajduje sie item i drugi bp to zamiast fromItem = 1 bp , toItem=2 bp to oba zwracaja pierwszy. Probowalem cos zmieniac w
Code:
if(toCylinder)
{
toItem = toCylinder->getItem();

if(toItem)
{
toPlayer = toItem->getHoldingPlayer();
Item* parentToItem = toItem->getTopParent()->getItem();
ale nawet nie wiem co oznaczaja getTopParent i toCylinder :p Silnik 0.3.6 , licze na mala pomoc :D
 
Back
Top