Jump to content
  • 0

Offline Shop Effect


Question

Posted

Hello, i maked offline shop effect with poly, problem is what my name as npc name: Rabbit + I don't see my Title sell/buy.

Thanks for helping, here is code:

OfflineTradersTable from 213 line

                                       items.close();
                                       stm_items.close();
                                      
                                       player.sitDown();
                                       player.setPrivateStoreType(type);
                                       player.setOnlineStatus(true, true);
                                       player.restoreEffects();
+                                     player.getPoly().setPolyInfo("npc", "14040");
                                       player.broadcastUserInfo();
                                       nTraders++;
                               }
                               catch (Exception e)
                               {
                                       _log.log(Level.WARNING, "OfflineTradersTable[loadOffliners()]: Error loading trader: "+player,e);
                                       if (player != null)
                                       {
                                               player.deleteMe();
                                       }
                               }
                       }

L2GameClient on DisconnectTask:

                 L2PcInstance player = L2GameClient.this.getActiveChar();
                 if (player != null)
                     {
                     if ((player.isInStoreMode() && Config.OFFLINE_TRADE_ENABLE) || (player.isInCraftMode() && Config.OFFLINE_CRAFT_ENABLE))
                         {
                         if (player.getPet() != null)
                 {
                   player.getPet().unSummon(player);
                    }
                                                               
                   player.leaveParty();

+      		player.getPoly().setPolyInfo("npc", "14040");
+		player.teleToLocation(player.getX(), player.getY(), player.getZ(), 0);
+		player.broadcastUserInfo();
                                                               
                if (player.getOfflineStartTime() == 0)
            player.setOfflineStartTime(System.currentTimeMillis());
                                                       

4 answers to this question

Recommended Posts

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...