Jump to content
  • 0

Party Link


maynard

Question


  • Group:  Members
  • Topic Count:  44
  • Topics Per Day:  0.01
  • Content Count:  159
  • Reputation:   1
  • Joined:  12/21/11
  • Last Seen:  

Can I request a scroll or orb item that can give a link to a whole party. 1 player will use the scroll then everyone in the party will be soul link in the map or maybe even if they are not in the current map if possible. I found 1 script in eathena but it doesn't work to me.I put it here in request section because maybe someone can do better or simplified version.

function script partysoul {
set .@ptid,getcharid(1,strcharinfo(0));
if(!.@ptid){
if( Class == 19 || Class == 20 || Class == 4020 || Class == 4021 || Class == 4042 || Class == 4043 || Class == 4068 || Class == 4075 || Class == 4069 || Class == 4076 ){ set .@skillid,455;}
if( Class == 7 || Class == 13 || Class == 4008 || Class == 4014 || Class == 4030 || Class == 4036 || Class == 4054 || Class == 4060 ){ set .@skillid,452;}
if( Class ==14 || Class == 21 || Class == 4022 ||4044 || Class == 4037 || Class == 4066 || Class == 4073 ){ set .@skillid,450;}
if( Class == 18 || Class == 4019 || Class == 4041 || Class == 4071 || Class == 4078 ){ set .@skillid,445;}
if( Class == 16 || Class == 4039 || Class == 4017 || Class == 4055 || Class == 4061 ){ set .@skillid,449;}
if( Class == 15 || Class == 4016 || Class == 4038 || Class == 4070 || Class == 4077 ){ set .@skillid,447;}
if( Class == 9 || Class == 4010 || Class == 4032 || Class == 4067 || Class == 4074 ){ set .@skillid,453;}
if( Class == 12 || Class == 4013 || Class == 4035 || Class == 4059 || Class == 4065 ){ set .@skillid,457;}
if( Class == 8 || Class == 4009 || Class == 4031 || Class == 4057 || Class == 4063 ){ set .@skillid,454;}
if( Class == 17 || Class == 4018 || Class == 4040 || Class == 4049 || Class == 4072 || Class == 4079 ){set .@skillid,456;}
if( Class == 10 || Class == 4011 || Class == 4033 || Class == 4058 || Class == 4064){ set .@skillid,458;}
if( Class == 11 || Class == 4012 || Class == 4034 || Class == 4056 || Class == 4062 ){ set .@skillid,460;}
if( Class == 23 || Class == 4045 ){ set .@skillid,451;}
if( Class == 4047 ){ set .@skillid,448; }
if( Class == 4049 ){ set .@skillid,461; }
getmapxy(.@map$,.@x,.@y,0,strcharinfo(0));
set .@mobgid,bg_monster(0,.@map$,.@x,.@y,"soulgiver",1002,"");
unitskilluseid .@mobgid,.@skillid,1,getcharid(3);
sleep2 1000;
unitkill .@mobgid;
end;
 }
getpartymember(.@ptid,2);
set .@ptmcount,$@partymembercount;
copyarray .@ptmaid[0],$@partymemberaid[0],.@ptmcount;
for(set .@i,0;.@i<getarraysize(.@ptmaid);set .@i,.@i+1)
 { if(!isloggedin(.@ptmaid[.@i])) continue;
attachrid(.@ptmaid[.@i]);
if( Class == 19 || Class == 20 || Class == 4020 || Class == 4021 || Class == 4042 || Class == 4043 || Class == 4068 || Class == 4075 || Class == 4069 || Class == 4076 ){ set .@skillid,455;}
if( Class == 7 || Class == 13 || Class == 4008 || Class == 4014 || Class == 4030 || Class == 4036 || Class == 4054 ||Class == 4060){ set .@skillid,452;}
if( Class ==14 || Class == 21 || Class == 4022 ||4044 || Class == 4037 || Class == 4066 || Class == 4073 ){ set .@skillid,450;}
if( Class == 18 || Class == 4019 || Class == 4041 || Class == 4071 || Class == 4078 ){ set .@skillid,445;}
if( Class == 16 || Class == 4039 || Class == 4017 || Class == 4055 || Class == 4061  ){ set .@skillid,449;}
if( Class == 15 || Class == 4016 || Class == 4038 || Class == 4070 || Class == 4077 ){ set .@skillid,447;}
if( Class == 9 || Class == 4010 || Class == 4032 || Class == 4067 || Class == 4074 ){ set .@skillid,453;}
if( Class == 12 || Class == 4013 || Class == 4035 || Class == 4059 || Class == 4065 ){ set .@skillid,457;}
if( Class == 8 || Class == 4009 || Class == 4031 || Class == 4057 || Class == 4063 ){ set .@skillid,454;}
if( Class == 17 || Class == 4018 || Class == 4040 || Class == 4072 || Class == 4049 ){ set .@skillid,456;}
if( Class == 10 || Class == 4011 || Class == 4033 || Class == 4058 || Class == 4064){ set .@skillid,458;}
if( Class == 11 || Class == 4012 || Class == 4034 || Class == 4056 || Class == 4062 ){ set .@skillid,460;}
if( Class == 23 || Class == 4045 ){ set .@skillid,451;}
if( Class == 4047 ){ set .@skillid,448; }
if( Class == 4049 ){ set .@skillid,461; }
getmapxy(.@map$,.@x,.@y,0,strcharinfo(0));
set .@mobgid,bg_monster(0,.@map$,.@x,.@y,"soulgiver",1002,"");
unitskilluseid .@mobgid,.@skillid,5,getcharid(3);
sleep2 1000;
unitkill .@mobgid;
detachrid;
 }
end;
}

Edited by Emistry
Please use [CODEBOX] or Attachments for long contents.
Link to comment
Share on other sites

7 answers to this question

Recommended Posts

  • 1

  • Group:  Members
  • Topic Count:  18
  • Topics Per Day:  0.00
  • Content Count:  2044
  • Reputation:   682
  • Joined:  10/09/12
  • Last Seen:  

update this script also

prontera,157,178,5	script	Sample	100,{
if ( !getcharid(1) ) {
	callsub L_soullink;
	end;
}
getpartymember getcharid(1), 1;
getpartymember getcharid(1), 2;
getmapxy .@map1$, .@x1, .@y1, 0;
.@area = getbattleflag("area_size");
for ( .@i = 0; .@i < $@partymembercount; .@i++ ) {
	if ( isloggedin( $@partymemberaid[.@i], $@partymembercid[.@i] ) ) {
		attachrid $@partymemberaid[.@i];
		getmapxy .@map2$, .@x2, .@y2, 0;
		if ( .@map1$ == .@map2$ && distance( .@x1, .@y1, .@x2, .@y2 ) <= .@area && hp > 0 )
			callsub L_soullink;
	}
}
end;
L_soullink:
if ( .@spirit = getd( ".spirit_id_"+ basejob ) );
else if ( upper & 1 && baselevel < 70 )
	.@spirit = 494;
else
	return;
sc_start4 sc_spirit, 300000, 5, .@spirit,0,0;
skilleffect .@spirit, 5;
return;
OnInit:
setd ".spirit_id_"+ Job_Alchemist, 445;
setd ".spirit_id_"+ Job_Monk, 447;
setd ".spirit_id_"+ Job_Star_Gladiator, 448;
setd ".spirit_id_"+ Job_Sage, 449;
setd ".spirit_id_"+ Job_Crusader, 450;
setd ".spirit_id_"+ Job_SuperNovice, 451;
setd ".spirit_id_"+ Job_Knight, 452;
setd ".spirit_id_"+ Job_Wizard, 453;
setd ".spirit_id_"+ Job_Priest, 454;
setd ".spirit_id_"+ Job_Bard, 455;
setd ".spirit_id_"+ Job_Dancer, 455;
setd ".spirit_id_"+ Job_Rogue, 456;
setd ".spirit_id_"+ Job_Assassin, 457;
setd ".spirit_id_"+ Job_Blacksmith, 458;
setd ".spirit_id_"+ Job_Hunter, 460;
setd ".spirit_id_"+ Job_Soul_Linker, 461;
end;
}

hehehe found so many new techniques

  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  48
  • Topics Per Day:  0.01
  • Content Count:  410
  • Reputation:   29
  • Joined:  04/04/12
  • Last Seen:  

Try this out. I haven't had time to test it though.

function script partysoul {
set @partyname$, strcharinfo(1);
set .@i, 2000000;
while ( .@i < 2010000 ) {
 if ( .@i % 500 == 0 ) sleep 20;
  if ( attachrid(.@i) ) {
if( strcharinfo(1) == @partyname$ ) {
 switch ( basejob ) {
  case Job_Alchemist: set .@spirit, 445; break;
  case Job_Monk: set .@spirit, 447; break;
  case Job_Star_Gladiator: set .@spirit, 448; break;
  case Job_Sage: set .@spirit, 449; break;
  case Job_Crusader: set .@spirit, 450; break;
  case Job_SuperNovice: set .@spirit, 451; break;
  case Job_Knight: set .@spirit, 452; break;
  case Job_Wizard: set .@spirit, 453; break;
  case Job_Priest: set .@spirit, 454; break;
  case Job_Bard: case Job_Dancer: set .@spirit, 455; break;
  case Job_Rogue: set .@spirit, 456; break;
  case Job_Assassin: set .@spirit, 457; break;
  case Job_Blacksmith: set .@spirit, 458; break;
  case Job_Hunter: set .@spirit, 460; break;
  case Job_Soul_Linker: set .@spirit, 461; break;
 default:
  if ( upper == 1 && baselevel < 70 )
  set .@spirit, 494;
  }
 if ( .@spirit ) {
  sc_start4 sc_spirit, 300000, 5, .@spirit,0,0;
  skilleffect .@spirit, 5;
  delitem 21224, 1; // change this to your item
  }
 }
}
  set .@i, .@i +1;
  end;
 }
}

Edited by Emistry
Please use [CODEBOX] or Attachments for long contents.
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  44
  • Topics Per Day:  0.01
  • Content Count:  159
  • Reputation:   1
  • Joined:  12/21/11
  • Last Seen:  

If you click it, only the party leader will get the link. What I want is all player in a party will get a link at the same time,If there are 5 player in a party all of them get a link using 1 scroll.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  18
  • Topics Per Day:  0.00
  • Content Count:  2044
  • Reputation:   682
  • Joined:  10/09/12
  • Last Seen:  

level 2 event script question ...

truly, still many people couldn't make event script that's party or guild based ...

prontera,157,178,5    script    Sample    757,{
   if ( getcharid(1) == 0 ) {
       callsub L_soullink;
       end;
   }
   getpartymember getcharid(1), 1;
   getpartymember getcharid(1), 2;
   getmapxy .@map1$, .@x1, .@y1, 0;
   .@area = getbattleflag("area_size");
   for ( .@i = 0; .@i < $@partymembercount; .@i++ ) {
       if ( isloggedin( $@partymemberaid[.@i], $@partymembercid[.@i] ) ) {
           attachrid $@partymemberaid[.@i];
           getmapxy .@map2$, .@x2, .@y2, 0;
           if ( .@map1$ == .@map2$ && distance( .@x1, .@y1, .@x2, .@y2 ) <= .@area && hp > 0 ) {
               callsub L_soullink;
           }
       }
   }
   end;
L_soullink:
   switch ( basejob ) {
       case Job_Alchemist: set .@spirit, 445; break;
       case Job_Monk: set .@spirit, 447; break;
       case Job_Star_Gladiator: set .@spirit, 448; break;
       case Job_Sage: set .@spirit, 449; break;
       case Job_Crusader: set .@spirit, 450; break;
       case Job_SuperNovice: set .@spirit, 451; break;
       case Job_Knight: set .@spirit, 452; break;
       case Job_Wizard: set .@spirit, 453; break;
       case Job_Priest: set .@spirit, 454; break;
       case Job_Bard: case Job_Dancer: set .@spirit, 455; break;
       case Job_Rogue: set .@spirit, 456; break;
       case Job_Assassin: set .@spirit, 457; break;
       case Job_Blacksmith: set .@spirit, 458; break;
       case Job_Hunter: set .@spirit, 460; break;
       case Job_Soul_Linker: set .@spirit, 461; break;
       default:
           if ( upper == 1 && baselevel < 70 )
               set .@spirit, 494;
   }
   if ( .@spirit ) {
       sc_start4 sc_spirit, 300000, 5, .@spirit,0,0;
       skilleffect .@spirit, 5;
   }
   return;
}

I hope you know how to convert npc script into item database script

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  44
  • Topics Per Day:  0.01
  • Content Count:  159
  • Reputation:   1
  • Joined:  12/21/11
  • Last Seen:  

This shows in mapserv.

script error on line 9. parse_line: expect command.missing function name or calling undeclared function

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  18
  • Topics Per Day:  0.00
  • Content Count:  2044
  • Reputation:   682
  • Joined:  10/09/12
  • Last Seen:  

get out of here if you are not using rathena <.<

anyways, those are C language operators

change

.@area = getbattleflag("area_size");

into

set .@area, getbattleflag("area_size");

though, you should ask the question in your respected forum for the emulator you used,

I'm not going to adjust my script to compatible with other emulator

after all this is rathena forum


EDIT for below

WAHAHAHAHA !!! me rep_up.png your post too <3

Edited by AnnieRuru
  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  72
  • Topics Per Day:  0.02
  • Content Count:  2997
  • Reputation:   1130
  • Joined:  05/27/12
  • Last Seen:  

get out of here if you are not using rathena <.<

I'm not going to adjust my script to compatible with other emulator

after all this is rathena forum

Amen to that.

  • Upvote 1
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...