Jump to content
  • 0

Is this possible to make? Chat/waitroom with warp


HristDead

Question


  • Group:  Members
  • Topic Count:  66
  • Topics Per Day:  0.02
  • Content Count:  167
  • Reputation:   2
  • Joined:  08/01/12
  • Last Seen:  

I'm looking for a script like this:

 

One NPC...

It's a chat/waiting room that needs 10 players, but to enter the chatroom you need an specific item i.e poring coin or a cancel window will pop up.

If that chat is full, it'll warp all players inside to example prontera.

 

I already use search but I couldnt figure it out. I know how to make a chatroom but not with requirement and also not with warp included.

 

many thanks for who is willing to help! :)

Edited by HristDead
Link to comment
Share on other sites

2 answers to this question

Recommended Posts


  • Group:  Forum Moderator
  • Topic Count:  33
  • Topics Per Day:  0.01
  • Content Count:  1268
  • Reputation:   382
  • Joined:  02/03/12
  • Last Seen:  

prontera,100,100,5	script	NPCNPC	100,{
	end;
	OnWarp:
		if(countitem(.itemid)<.itmamt) {
			atcommand "@refresh";
			mes "I'm sorry but you don't have enough "+getitemname(.itemid)+" to enter this chat.";
			close;
		}
		delitem .itemid,.itmamt;
		if(getwaitingroomstate(32))
			warpwaitingpc "prontera",100,100,getwaitingroomstate(0);
		end;
	OnInit:
		set .itemid, 7539;
		set .itmamt, 1   ;
		set .amtppl, 10  ;
		waitingroom "ChatWarp",(.amtppl+1),"NPCNPC:OnWarp",1;
}

 

Untested because my Harddrives dying and half my files are fragmented but yeah hope it work. Because I think the rid might not be passed through a waiting room event...

 


 

You can also try this script, but it needs to be located away from other npcs and might also get activated by player based chat rooms. Still untested.

 

prontera,100,100,5	script	NPCNPC	100,24,24,{
	end;
	OnTouch:
		while(.@map$==""||sqrt(pow([email protected],2)+pow([email protected],2))<24) {
			getmapxy(.@map$,.@x,.@y,0);
			if(checkchatting(strcharinfo(0))) {
				set .@tmp, countitem(.itemid);
				if(.@tmp<.itmamt) {
					atcommand "@refresh";
					mes "I'm sorry but you don't have enough "+getitemname(.itemid)+" to enter this chat.";
					mes "You need "+(.itmamt-.@tmp)+" more.";
					close;
				}
				delitem .itemid,.itmamt;
				dispbottom "Item deleted: You can continue waiting for the event.";
				break;
			}
		}
		end;

	OnWarp:
		if(getwaitingroomstate(32))
			warpwaitingpc "prontera",100,100,getwaitingroomstate(0);
		end;

	OnInit:
		set .itemid, 7539;
		set .itmamt, 1   ;
		set .amtppl, 10  ;
		getmapxy(.map$,.x,.y,1);
		waitingroom "ChatWarp",(.amtppl+1),"NPCNPC:OnWarp",1;
}
Edited by Skorm
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  66
  • Topics Per Day:  0.02
  • Content Count:  167
  • Reputation:   2
  • Joined:  08/01/12
  • Last Seen:  

Thanks for the reply!

Hmm. the first script I tried but it doesn't give the message.

 

I changed my mind too actually... is it possible to first force the players to be in a party before they can join a the chatroom?

 

I've tried to replace the item count part with this but it doesnt work. >.< any idea?

 

    end;
    OnWarp:
        getpartymember getcharid(1);
        if($@partymembercount < 2) {
            atcommand "@refresh";
            mes "Please party up first.";
            close;
        }
Edited by HristDead
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

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