Jump to content

Recommended Posts

Posted

I have problem with E-Inquiry.

My player is already send a message to lvl99 gm. But the lvl99 gm's is not recieving message from normal characters. See the image below

Player

xfqmme.jpg

lvl99 GM

w9jghv.jpg

Im using eA.

main script

- script E-Inquiry -1,{

OnStartMenu:
mes "Do you having problems and wish to inform GM Staffs about this ?";
next;
switch( select( "View Messages",
"Write Messages",
( getgmlevel() < .GMLevel )?"":"^FF0000[ GM ]^000000 Manage Messages" )){

Case 1:
do{
mes "What types of Messages you would like to View ?";
for( set .@i,0; .@i < 3; set .@i,.@i + 1 )
set .@Found[.@i],query_sql("SELECT `ID` FROM `E-Inquiry` WHERE `Status` = "+.@i+" AND `Sender_ID`='"+getcharid(3)+"'",.@ID );

set .@Msg,select("^FF0000Un-Replied Messanges [ ^FF0000"+.@Found[0]+"^000000 ]",
"^0000FFReplied Messages^000000 [ ^FF0000"+.@Found[1]+"^000000 ]",
"Archieved Messages [ ^FF0000"+.@Found[2]+"^000000 ]" ) - 1;
set .@Replied,query_sql(" SELECT `ID`,`Title`,`Message`,`Inquiry_Time`,`Reply`,`Reply_Time`,`Reply_Name` FROM `E-Inquiry` WHERE `Status`= "+.@Msg+" AND `Sender_ID`='"+getcharid(3)+"' ",.@ID, .@Title$,.@Message$,.@Time$,.@Reply$,.@ReplyTime$,.@ReplyName$ );
if( !.@Replied ){
mes "You didnt have Messages to read.";
next;
}else{
set .@Menu$,"";
for( set .@i,0; .@i < .@Replied; set .@i,.@i + 1 )
set .@Menu$,.@Menu$ + "^FF0000[ "+( .@i+1 )+". ]^0000FF "+.@Title$[.@i]+":";
next;
set .@Select,select( .@Menu$ ) - 1;
mes "^00FF00____________________________^000000";
mes "^FF0000Date :^000000 : "+.@Time$[.@Select];
mes "^FF0000Title^000000 : "+.@Title$[.@Select];
mes "^00FF00____________________________^000000";
mes "^FF0000Messages^000000 : "+.@Message$[.@Select];
mes "^00FF00____________________________^000000";
if( .@Msg > 0 ){
mes "^0000FFReply from ^FF0000"+.@ReplyName$[.@Select]+" ^000000 : "+.@Reply$[.@Select];
mes "^00FF00____________________________^000000";
mes "^0000FFTime ^000000 : "+.@ReplyTime$[.@Select];
}
next;
set .@MsgOpt1,select("View Other Messages",( .@Msg == 1 )?"Move to Archieve":"","Delete Message" );
switch( .@MsgOpt1 ){
Case 2:
query_sql("UPDATE `E-Inquiry` SET `Status` = 2 WHERE `ID` = "+.@ID[.@Select]+" ");
mes "Message has been moved to Archieve.";
break;
Case 3:
query_sql("DELETE FROM `E-Inquiry` WHERE `ID` = "+.@ID[.@Select]+" ");
mes "Message has been DELETED.";
break;
default:
break;
}
}
}while( .@MsgOpt1 < 3 );
break;

Case 2:
mes "^00FF00____________________________^000000";
mes "^FF0000NOTES :^000000 All the Messages will be recorded for future references, so please do not abuse this. Otherwise action will be taken on you";
do{
next;
mes "^00FF00____________________________^000000";
mes "^FF0000Title^000000 : "+.@Title$;
mes "^00FF00____________________________^000000";
mes "^FF0000Messages^000000 : "+.@Message$;
mes "^00FF00____________________________^000000";

next;
set .@Select,select(( .@Title$ == "" )?"[ ^FF0000Incomplete^000000 ] Title":"[ ^0000FFCompleted^000000 ] Title",
( .@Message$ == "" )?"[ ^FF0000Incomplete^000000 ] Message":"[^0000FFCompleted^000000 ] Title",
( .@Title$ == "" || .@Message$ == "" )?"":"^FF0000SEND MESSAGE^000000" );

switch( .@Select ){
Case 1:
mes "Enter a Title for your Problems";
input .@Title$;
break;
Case 2:
mes "Briefly explain what's your Problem";
set .@i,0;
do{
input getd(".@Message"+.@i+"$");
set .@Message$,.@Message$ + getd(".@Message"+.@i+"$")+" ";
set .@Continue,select("Complete:Continue Messages");
}while( .@Continue == 2 );
break;
default:
mes "Your message has been sent.";
query_sql( "INSERT INTO `E-Inquiry` ( `Sender_ID`,`Sender_Name`,`Title`,`Message`,`Status`,`Inquiry_Time` ) VALUES ( "+getcharid(3)+",'"+escape_sql(strcharinfo(0))+"','"+escape_sql(.@Title$)+"','"+escape_sql(.@Message$)+"',0,'"+gettimestr("%Y-%m-%d %H:%M:%S",21)+"' ) ");
break;
}
}while( .@Select != 3 );
break;

Case 3:
do{
mes "Alright, what next ?";
next;
for( set .@i,0; .@i < 3; set .@i,.@i + 1 )
set .@Found[.@i],query_sql("SELECT `ID` FROM `E-Inquiry` WHERE `Status` = "+.@i+"",.@ID );

set .@Types,select("^FF0000View All Unread Messanges [ ^FF0000"+.@Found[0]+"^000000 ]",
"View All Replied Messages^000000 [ ^FF0000"+.@Found[1]+"^000000 ]",
"View All Archieved Messages [ ^FF0000"+.@Found[2]+"^000000 ]" ) - 1;

set .@ManageMSG,query_sql(" SELECT `ID`,`Sender_Name`,`Title`,`Message`,`Inquiry_Time`,`Reply`,`Reply_Time`,`Reply_Name` FROM `E-Inquiry` WHERE `Status`= "+.@Types+" LIMIT 127",.@ID,.@Sender$, .@Title$,.@Message$,.@Time$,.@Reply$,.@ReplyTime$,.@ReplyName$ );
if( !.@ManageMSG ){
mes "You didnt have Messages to read.";
next;
}else{
set .@Menu$,"";
for( set .@i,0; .@i < .@ManageMSG; set .@i,.@i + 1 )
set .@Menu$,.@Menu$ +"^FF0000[ "+( .@i+1 )+". ]^0000FF "+.@Title$[.@i]+":";
next;
set .@Select,select( .@Menu$ ) - 1;
mes "^00FF00____________________________^000000";
mes "^FF0000Date :^000000 : "+.@Time$[.@Select];
mes "^FF0000Aurthor :^000000 : "+.@Sender$[.@Select];
mes "^FF0000Title^000000 : "+.@Title$[.@Select];
mes "^00FF00____________________________^000000";
mes "^FF0000Messages^000000 : "+.@Message$[.@Select];
mes "^00FF00____________________________^000000";
if( .@Types > 0 ){
mes "^0000FFReply from ^FF0000"+.@ReplyName$[.@Select]+" ^000000 : "+.@Reply$[.@Select];
mes "^00FF00____________________________^000000";
mes "^0000FFTIme ^000000 : "+.@ReplyTime$[.@Select];
}
next;
set .@MsgOpt1,select( ( .@Types == 2 )?"":"Reply Message","View Other Messages","Delete Message" );
switch( .@MsgOpt1 ){
Case 1:
set .@i,0;
do{
input getd(".@Reply"+.@i+"$");
set .@Reply$,.@Reply$ + getd(".@Reply"+.@i+"$")+" ";
set .@Continue,select("Complete:Continue Messages");
}while( .@Continue == 2 );

query_sql("UPDATE `E-Inquiry` SET `Status` = 1,`Reply`='"+escape_sql(.@Reply$)+"',`Reply_Name`='"+escape_sql(strcharinfo(0))+"',`Reply_Time`='"+gettimestr("%Y-%m-%d %H:%M:%S",21)+"' WHERE `ID` = "+.@ID[.@Select]+" ");
message strcharinfo(0),"Reply has been sent.";
break;
Case 3:
query_sql("DELETE FROM `E-Inquiry` WHERE `ID` = "+.@ID[.@Select]+" ");
mes "Message has been Deleted.";
default:
break;
}
}
}while( .@MsgOpt1 != 1 );
break;
}
close;

OnInit:
// Min. GM Level to Read / Manage Messages.
set .GMLevel,99;
end;

OnPCLoginEvent:
if( getgmlevel() < .GMLevel ){
set .@Replied,query_sql("SELECT `ID` FROM `E-Inquiry` WHERE `Status` = 1 AND `Sender_ID`='"+getcharid(3)+"'",.@ID );
if( .@Replied )
message strcharinfo(0),"You have "+.@Replied+" Replied Messages from GM Team.";
}else{
set .@Unread,query_sql("SELECT `ID` FROM `E-Inquiry` WHERE `Status` = 0 ",.@ID );
if( .@Unread )
message strcharinfo(0),"GM Team received "+.@Unread+" New Message from Players.";
}
if( .@Replied || .@Unread ){
if( select("Read the Messages:Cancel") == 2 ) close;
goto OnStartMenu;
}
end;

}

// Main NPC
prontera,151,186,5 script E-Inquiry#Main 757,{
doevent "E-Inquiry::OnStartMenu";
}

// Duplicates NPC
// prontera,155,181,5 duplicate(E-Inquiry#Main) E-Inquiry#1 757
// prontera,155,182,5 duplicate(E-Inquiry#Main) E-Inquiry#2 757
// prontera,155,183,5 duplicate(E-Inquiry#Main) E-Inquiry#3 757

sql script

CREATE TABLE IF NOT EXISTS `E-Inquiry` (
`ID` bigint(20) unsigned NOT NULL auto_increment,
`Sender_ID` int(11) unsigned NOT NULL default '0',
`Sender_Name` varchar(30) NOT NULL default '',
`Title` text,
`Message` text,
`Status` tinyint(2) NOT NULL default '0',
`Inquiry_Time` datetime NOT NULL default '0000-00-00 00:00:00',
`Reply` text,
`Reply_Time` datetime NOT NULL default '0000-00-00 00:00:00',
`Reply_Name` varchar(30) NOT NULL default '',
PRIMARY KEY  (`ID`)
) ENGINE=MyISAM;

Posted

@WillSuranol ....

LOL...have you ever noticed there is a GM Panel ???

Y6ZlM.png

and this is how it look like when you enter the panel ....

z1g36.png

Posted (edited)

I'm using latest SVN 16823 and I get this error:

The npc ( the warper ) loads, checks the party without any problems, once we're all warped to guild_vs5 and we click on the npc stage game, nothing happens.

Map shows this error:

post-2028-0-77771500-1350848319_thumb.jpg

post-2028-0-87091000-1350848391_thumb.jpg

Edited by Cephaler
Posted

@Cephaler

owh...thx for reporting that ....

i forget that my script have that getmapmob() command in it....

it has been quite long since my last update for this script ...

will try update it when i recovered from my illness .... >.<

Posted

@Cephaler

owh...thx for reporting that ....

i forget that my script have that getmapmob() command in it....

it has been quite long since my last update for this script ...

will try update it when i recovered from my illness .... >.<

Oh! Didn't know you were sick. Hope you feel better soon ;)!

Thanks for all your scripts/support!

Posted

im using the woe controller and auto-kick is not working.

/swt

i am EMISTRY ....not EUPHY ~

WOE Controller is @Euphy's Script......

you ask at the wrong topic ....

i believe you are actually looking for him instead of me.

Posted

im using the woe controller and auto-kick is not working.

/swt

i am EMISTRY ....not EUPHY ~

WOE Controller is @Euphy's Script......

you ask at the wrong topic ....

i believe you are actually looking for him instead of me.

oh.. sorry about that. i think i posted this when im about to go to sleep /wah

Posted

Hello Emistry,

about your Refine Function v5, how can i make it to no item requirement to refine. I tried put the itemid <0>,amout<0> it didnt work.

i didnt make the script able to refine without any requirement...

anyway...

why not you just give some simple item as requirement....such as...Red Potion / Phracon / Emvereton / etc...??

i believe your player can get those items instantly from certain NPC / hunting..

Posted

@Cephaler

owh...thx for reporting that ....

i forget that my script have that getmapmob() command in it....

it has been quite long since my last update for this script ...

will try update it when i recovered from my illness .... >.<

Hey Emistry did you have time to fix the stage game? I love it so much I can't wait to try it again haha ( i had it in an old eathena server of mine ) ;)

Ps: Hope you're feeling better!

Posted (edited)

Emistry, I looked at your 'IP' map restriction script; isn't it better to use an array, and have a for loop, loop through the maps? (Example below; didn't test) Also, perhaps you could add a Mac restriction for Harmony users.

-	script	Sample	-1,{
OnPCLoadMapEvent:
for( set .@i,0; set .@i < getarraysize(.Map$); set .@i,.@i+1) {
if( strcharinfo(3) == .Map$ ){
query_sql( "SELECT `last_ip` FROM `login` WHERE account_id="+getcharid(3)+"",.@IP );
query_sql( "SELECT `account_id` FROM `login` WHERE last_ip="+.@IP+"",.@Accountlist );

for( set .@i,0; .@i < getarraysize( .@Accountlist ); set .@i,.@i + 1 )
	if( isloggedin( .@Accountlist[.@i] ) )
		set .@DetectedOnline,.@DetectedOnline + 1;

	if( .@DetectedOnline > .Limit ){
		mes "We detected there is "+.@DetectedOnline+" Users with same IP Logged in.";
		mes "Please log off these unused account.";
		close2;
		warp "prontera",155,181;
	}
}
}
end;

OnInit:
// How many User with Same IP can logged in and stay at the specific map
set .Limit,2;
// What map will be restricted
setarray .Map$[0],"payon","morocc","geffen";
for( set .@i,0; set .@i < getarraysize(.Map$); set .@i,.@i+1) setmapflag .Map$[.@i],mf_loadevent;
end;
}

For harmony users you could set last_ip to last_mac..

  	 query_sql "select `last_mac` from `login` where `account_id`='"+getcharid(3)+"'",.@MAC$;

Edited by garet999
Posted

@Cephaler

will dig some of my time for it.....

Fixed Script by @goddameit

Stage Game [ Version 4 ]

Changelog :

  • [ Version 1 ] - A Mini Game that required players to eliminate all Monster in each Stage to win.
  • [ Version 2 ] - Enable simple Customization on script.
  • [ Version 3 ] - Fixed Stuck Problem in upcoming Round and added several Mapflags..
  • [ Version 4 ] - Fixed rA compatibility problem by @goddameit. thx...^^

Scripts : View Download

( thx goddameit ^^ )

@garet999

erm..ya..it would be better to loop through the maps if they want it to be multiple maps...

for SQL...not really good in getting the data by joined 2 table ( using JOINT ) or nested SQL commands...

but here only 1 table..LOL...( how come i didnt notice about it ??? )

( i guess i copied part of the script from someone...forgot who is it or maybe i did it.....i seldom do SQL scripts )

for harmony stuff...not sure..since i am not a users for harmony.. i dont know how it work...

Posted (edited)

If you guys are lazy like i am, just copy the script from the view, much less work in putting all the tabs.. LOL!

just put your preferences.

Stage Game [ Version 4 ]

Spoiler

Scripts : View

Edited by stydianx
Posted

@Cephaler

will dig some of my time for it.....

Fixed Script by @goddameit

Stage Game [ Version 4 ]

Changelog :

  • [ Version 1 ] - A Mini Game that required players to eliminate all Monster in each Stage to win.
  • [ Version 2 ] - Enable simple Customization on script.
  • [ Version 3 ] - Fixed Stuck Problem in upcoming Round and added several Mapflags..
  • [ Version 4 ] - Fixed rA compatibility problem by @goddameit. thx...^^

Scripts : View Download

( thx goddameit ^^ )

@garet999

erm..ya..it would be better to loop through the maps if they want it to be multiple maps...

for SQL...not really good in getting the data by joined 2 table ( using JOINT ) or nested SQL commands...

but here only 1 table..LOL...( how come i didnt notice about it ??? )

( i guess i copied part of the script from someone...forgot who is it or maybe i did it.....i seldom do SQL scripts )

for harmony stuff...not sure..since i am not a users for harmony.. i dont know how it work...

The script works, except the waiting room only has " NULL " written on it regarding of having availability or not.

Posted

Hi emistry, im currently using your multi currency shop npc, and im getting this.

[Warning]: npc_parsename: Duplicate unique name in file 'npc/custom/hollowshop2.txt', line'10'. Renaming 'Emistry_Shop' to '1_-1_0_0'.

[Debug]: this npc:

display name 'Emistry_Shop'

unique name 'Emistry_Shop'

map=(not on a map), x=0, y=0

what does it mean?

also im duplicating the npcs so i have about 7 of the same npcs, i hope thats not gonna cause any problems.

Posted

It means you're using a same name for your NPC multiple times so the names are changed automatically, it can be solved by simply change the name of your duplicated NPC into something like

Emistry_Shop#eshop1
Emistry_Shop#eshop2
Emistry_Shop#eshop3

Posted

will this work on equipment like god item ahura or just item only? I tried to equip it on when entering the map and the script did not detect. my gm is only lvl 50. I use eathena and its working fine for the item. Just have problem with the equipment.

Posted

will this work on equipment like god item ahura or just item only? I tried to equip it on when entering the map and the script did not detect. my gm is only lvl 50. I use eathena and its working fine for the item. Just have problem with the equipment.

yes...it will check for equipments also....

in the default script...

Zone 3 and Zone 4 both have example to restrict the amount of Helm of Sun ( ItemID#5022 )

make sure the value for 'Amount' is 0 if you want to disable them to bring the item into the map you want.

Posted (edited)

It's not working to me.maybe its not compatible to me,Thanks anyway.I love your script.

Case 0: CheckItems( 556,1 ); break;
Case 1: CheckItems( 556,5,608,1,2199,0,1599,0  ); break;
Case 2: CheckItems( 556,1000,2199,0,1599,0 ); break;
Case 3: CheckItems( 556,5,608,1,4002,1,5022,1,2199,0,1599,0 ); break;
Case 4: CheckItems( 556,1,608,15,5022,2,7227,10 ); break;

Edited by maynard

Join the conversation

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

Guest
Reply to this topic...

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

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...