Jump to content
  • 0

Help me whis GK


Question

Posted

Hi all. The problem such each of races can grasp posts and GK should display and move on those posts which are grasped by the given race. I could implement only display at attempt to be moved nothing happens.

http://s019.radikal.ru/i612/1203/96/57c980c37841.bmp

Quest GK

# Created by Ham Wong on 2007.02.28
import sys
from com.l2jfrozen.gameserver.model.actor.instance import L2PcInstance
from com.l2jfrozen.gameserver.model.quest        import State
from com.l2jfrozen.gameserver.model.quest        import QuestState
from com.l2jfrozen.gameserver.model.quest.jython import QuestJython as JQuest

qn = "10001_RaceTeleport"
#print "10001. Race Teleport"
NPC=[30006,30059,30080,30134,30146,30177,30233,30256,30320,30540,30576,30836,30848,30878,30899,31275,31320,31964]

class Quest (JQuest) :

def __init__(self,id,name,descr): JQuest.__init__(self,id,name,descr)

def onTalk (Self,npc,player):
    st = player.getQuestState(qn) 
    if player.isNoble() == 1 :
      htmltext=player.getPost()
    else :
      htmltext=player.getPost()
    st.exitQuest(1)
    return htmltext

QUEST       = Quest(10001, qn, "Teleports")
CREATED     = State('Start', QUEST)

QUEST.setInitialState(CREATED)

for item in NPC:
   QUEST.addStartNpc(item)
   QUEST.addTalkId(item)

From a core

L2PcInstance:

public String getPost(){
	return OutpostManager.getOutpostRace(getRaceINT());
}

OutpostManager:

public static String getOutpostRace(int race){
	String postlist="<html><body>\n&$556;<br><br>";

	if(_outpost!=null){
	 for(Outpost post:_outpost){
		 if(post.getOwned()==race){
			postlist+="\n<a action=\"bypass -h npc_%objectId%_goto "+post.getPort()+"\" msg=\"811;"+post.getName()+"\">"+post.getName()+"</a><br1>";
		}
	  }
	}

	 if(postlist.equalsIgnoreCase("<html><body>&$556;<br><br>")){
		 postlist+="Нету захваченных постов"; 
	 }
	 else{
		 postlist+= "\n</body></html>";

	 }
	System.out.print(postlist);
	return postlist;
}

Assembly L2jFrozen in the table teleport is added point ТП from Ides 80000.

If the information is required still I will give.

2 answers to this question

Recommended Posts

  • 0
Posted

Google translator effects:

 

Hi all. The problem such each of races can grasp posts and GK should display and move on those posts which are grasped by the given race. I could implement only display at attempt to be moved nothing happens.

http://s019.radikal.ru/i612/1203/96/57c980c37841.bmp

Quest GK

# Created by Ham Wong on 2007.02.28
import sys
from com.l2jfrozen.gameserver.model.actor.instance import L2PcInstance
from com.l2jfrozen.gameserver.model.quest        import State
from com.l2jfrozen.gameserver.model.quest        import QuestState
from com.l2jfrozen.gameserver.model.quest.jython import QuestJython as JQuest

qn = "10001_RaceTeleport"
#print "10001. Race Teleport"
NPC=[30006,30059,30080,30134,30146,30177,30233,30256,30320,30540,30576,30836,30848,30878,30899,31275,31320,31964]

class Quest (JQuest) :

def __init__(self,id,name,descr): JQuest.__init__(self,id,name,descr)

def onTalk (Self,npc,player):
    st = player.getQuestState(qn) 
    if player.isNoble() == 1 :
      htmltext=player.getPost()
    else :
      htmltext=player.getPost()
    st.exitQuest(1)
    return htmltext

QUEST       = Quest(10001, qn, "Teleports")
CREATED     = State('Start', QUEST)

QUEST.setInitialState(CREATED)

for item in NPC:
   QUEST.addStartNpc(item)
   QUEST.addTalkId(item)

From a core

L2PcInstance:

public String getPost(){
	return OutpostManager.getOutpostRace(getRaceINT());
}

OutpostManager:

public static String getOutpostRace(int race){
	String postlist="<html><body>\n&$556;<br><br>";

	if(_outpost!=null){
	 for(Outpost post:_outpost){
		 if(post.getOwned()==race){
			postlist+="\n<a action=\"bypass -h npc_%objectId%_goto "+post.getPort()+"\" msg=\"811;"+post.getName()+"\">"+post.getName()+"</a><br1>";
		}
	  }
	}

	 if(postlist.equalsIgnoreCase("<html><body>&$556;<br><br>")){
		 postlist+="Нету захваченных постов"; 
	 }
	 else{
		 postlist+= "\n</body></html>";

	 }
	System.out.print(postlist);
	return postlist;
}

Assembly L2jFrozen in the table teleport is added point ТП from Ides 80000.

If the information is required still I will give.

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...