Jump to content

Shikka

Members
  • Posts

    33
  • Joined

  • Last visited

Everything posted by Shikka

  1. you've got one another option. It's not the best way to do so, but it'll work. i've tested it! 1.pvp on: activate permanent pvp on the desired map 2. loadmapevent: - script name -1,{ OnPCLoadMapEvent: getmapxy @loadmap$,@x,@y,0; "if (@loadmap$ == "prontera") {atcommand "battleignore";} //this will protect the player, who wont do pvp } 3. the npc's: prontera,155,82,0 script pvp_on_try 139,5,5,{ OnTouch: getmapxy @loadmap$,@x,@y,0; if (@loadmap$ == "prontera" && @x > 149 && @x < 163 && @y > 74 && @y < 89){ if (@ig == 1) end; atcommand "@battleignore"; // this will deactivate the immunity to all players in the desired area (you can get killed by other players) set @ig,1; end; } end; } prontera,148,74,4 script pvp_on_try2 139,10,10,{ if (@ig == 1) {atcommand "@battleignore";} // <--- that have to stay for the duplicates set @ig,0; end; } 4. duplicates: prontera,163,89,4 duplicate(pvp_on_try2) pvp_on_try#3 139,10,10 // will activate immunity to players who leave the area again prontera,148,89,4 duplicate(pvp_on_try2) pvp_on_try#4 139,10,10 // will activate immunity to players who leave the area again prontera,163,74,4 duplicate(pvp_on_try2) pvp_on_try#5 139,10,10 // will activate immunity to players who leave the area again works now
  2. Okay... neues problem =D Das PcFollow funktioniert zwar, aber ich müsste tausend npc's erstellen (pro stadt-map).... xD Damit kein User zu kurz kommt und das is bisl blöd... Gibt es vielleicht eine möglichkeit, das bewegen über die Maus für einen gewissen Zeitraum auszuschalten? Sowas wie blockmove nur für die Maus -> blockmouseclick oder so? Sorry leute, dass ich euch hier so zubombe mit fragen ^^ versuch -> script.c BUILDIN_FUNC(dis_mouse) { clif_mouse_dis; } // declarations that were supposed to be exported from npc_chat.c #ifdef PCRE_SUPPORT ---------- BUILDIN_DEF(dis_mouse, "ii"), {NULL,NULL,NULL}, }; clif.c /// Displays an NPC dialog message (ZC_SAY_DIALOG). /// 00b4 <packet len>.W <npc id>.L <message>.?B /// Client behavior (dialog window): /// - disable mouse targeting /// - open the dialog window /// - set npcid of dialog window (0 by default) /// - if set to clear on next mes, clear contents /// - append this text void clif_mouse_dis(struct map_session_data *sd, int npcid, const char *mes) { int fd = sd->fd; int slen = strlen(mes) + 9; WFIFOHEAD(fd, slen); WFIFOW(fd,0)=0xb4; WFIFOW(fd,2)=slen; WFIFOL(fd,4)=npcid; memcpy((char*)WFIFOP(fd,8), mes, slen-8); WFIFOSET(fd,WFIFOW(fd,2)); } ruft nen chat fenster auf, ohne text-inhalt. hätte es aber gerne ohne text-fenster, dass man mit der maus nichtmehr klicken kann. hab schon versuch einzelne sachen mit // rauszunehmen, aber klappt nicht
  3. @Masao Ja, bei mir funktionieren auch beide commands, aber beim ersten (UnitWalk) kannst du mit der Maus das laufen unterbrechen und somit läuft dein Char nicht automatisch weiter zum Ziel. Beim PcFollow kannst du dich nicht weit vom Npc entfernen (sonst gibt's nen auto-port zu ihm). Das ich den Npc dafür dort hinlaufen lassen muss, wo der Char hin soll, ist mir bewusst, es geht aber einwandfrei @Kenpachi Ich hab die Src edits, komplett wieder raus genommen. ^^ Funktioniert auch ohne. Ich kenn mich mit den Sourcen zu wenig aus. Ich freu mich gerade drüber, dass alles klappt, wie ich's wollte Danke aufjedenfall nochmals
  4. Hey, danke =D Unittalk funktioniert -> set .@GID,getcharid(3); unittalk .@GiD,"hallo";
  5. Hi, Ich wollte mal wissen, ob jemand weiß, ob der Unittalk befehl auch auf spieler ausführbar ist. das ähnlich wie beim npctalk wo der npc redet, stattdessen der spieler redet. also sogehen nen pctalk. probiert: prontera,100,100,4 script Test 113,{ set .GID,getcharid(0); / set .RID,getcharid(0); / set .@GID,getcharid(0); / set .@RID,getcharid(0); / set GID,getcharid(0); / set RID,getcharid(0); (auch schon weggelassen und alle unittalks ohne getcharid(0) durchgeführt, hat leider nicht geklappt) unittalk .GID,hallo; / unittalk .RID,hallo; / unittalk .@GID, hallo; / unittalk .@RID,hallo; / unittalk GID,hallo; / unittalk RID,hallo; end; }
  6. solved: okay, funktioniert doch =D set .@GID,getcharid(3); unitwalk .@GID,102,102; unitwalk .@GID,300,300; ging nicht, weil das der rand der map ist und nicht begehbar ist. neues problem -> das laufen kann per klick auf ein feld unterbrochen werden =( das find ich jetzt blöd edit: hat sich auch erledigt PCFollow getcharid(3),getnpcid(0); <-- spieler folgt dem npc --------------------- hmm... die möglichkeit funktioniert leider nicht, gerade getestet geht der pcfollow befehl nicht nur auf andere spieler? -> Makes a character follow or stop following someone. This command does the same as the @follow command. The main difference is that @follow can use character names, and this commands needs the Account ID for the target. (dürfte also nur auf spieler gehen - fällt somit auch weg) aber danke für den versuch und die schnelle antwort ^^
  7. Hi, Ich würde gerne im src einbauen, dass man per npc-klick, automatisch läuft. Sowas wie NPCWalkTo halt, nur, dass sich nicht der Npc bewegt, sondern der Spieler. Wäre das überhaupt möglich? Hab schon ein wenig im src rumgeschraubt, hat aber bisher nicht geklappt Hab's mit ner kopie von NPCWalkTo versucht und auf den pc abgeändert, hat aber nicht geklappt. Hab's aber auch garantiert falsch gemacht xD Wäre echt super, wenn mir da jemand helfen könnte. (Wäre für ne Stadt-rundschau gedacht. damit man die Stadt automatisch kennen lernt.) Danke im vorraus Bisheriger versuch: Script.c BUILDIN_FUNC(pcwalkto) { struct pc_data *pd=(struct pc_data *)map_id2bl(st->oid); int x=0,y=0; x=script_getnum(st,2); y=script_getnum(st,3); if(pd) { unit_walktoxy(&pd->bl,x,y,0); } return 0; } PC.C struct pc_data { struct block_list bl; struct unit_data ud; //Because they need to be able to move.... struct view_data *vd; struct status_change sc; //They can't have status changes, but.. they want the visual opt values. struct npc_data *master_nd; short class_; short speed; char name[NAME_LENGTH+1];// display name char exname[NAME_LENGTH+1];// unique npc name int chat_id; int touching_id; unsigned int next_walktime; unsigned size : 2; void* chatdb; // pointer to a npc_parse struct (see npc_chat.c) enum npc_subtype subtype; int src_id; union { struct { struct script_code *script; short xs,ys; // OnTouch area radius int guild_id; int timer,timerid,timeramount,rid; unsigned int timertick; struct npc_timerevent_list *timer_event; int label_list_num; struct npc_label_list *label_list; } scr; struct { struct npc_item_list* shop_item; int count; } shop; struct { short xs,ys; // OnTouch area radius short x,y; // destination coords unsigned short mapindex; // destination map } warp; } u; }; Grobe NPC vorlage: prontera,100,100,4 script Rundführer 113,{ setmounting(); pcblockmove getcharid(3),1; pcwalkto 300,300; sleep2 20000; pcblockmove getcharid(3),0; } (auch schon ohne blockmove getestet)
×
×
  • Create New...