begin rockringshort OnPCEquipshort hasrockif ( OnPCEquip == 1 ) ;player has equipped ring Player->AddItem, "your rock's ID" 1 set hasrock to 1 set OnPCEquip to 0 ;resets variable for next equipendifif ( Player->GetItemCount "your rock's ID" == 0 ) if ( hasrock == 1 ) MessageBox, "You cannot drop this rock as long as the ring is equipped." set dropped to 1 Player->AddItem "your rock's ID" 1 endifendifif ( Player->HasItemEquipped "your ring's ID" == 0 ) if ( Player->GetItemCount, "your rock's ID" == 1 ) Player->RemoveItem, "your rock's ID" 1 set hasrock to 0 endifendifend
begin delete;delete must be before disabling in the script so that it;doesn't get deleted in the same frame, otherwise it;would crash.if ( GetDisabled == 1 ) SetDelete 1endifif ( dropped == 1 ) disableendifend
begin rockringshort OnPCEquipshort hasrockif ( OnPCEquip == 1 ) ;player has equipped ring Player->AddItem, "your rock's ID" 1 set hasrock to 1 set OnPCEquip to 0 ;resets variable for next equipendifif ( Player->GetItemCount "your rock's ID" == 0 ) if ( hasrock == 1 ) MessageBox, "You cannot drop this rock as long as the ring is equipped." set dropped to 1 Player->AddItem "your rock's ID" 1 endifendifif ( Player->HasItemEquipped "your ring's ID" == 0 ) if ( Player->GetItemCount, "your rock's ID" == 1 ) Player->RemoveItem, "your rock's ID" 1 set hasrock to 0 endifendifend
begin delete;delete must be before disabling in the script so that it;doesn't get deleted in the same frame, otherwise it;would crash.if ( GetDisabled == 1 ) SetDelete 1endifif ( dropped == 1 ) disableendifend