Jump to content

Vach

Members
  • Posts

    326
  • Joined

  • Last visited

2 Followers

Profile Information

  • Gender
    Not Telling
  • Location
    California, USA
  • Server
    Echoes Ragnarok
  • Interests
    BEING SILLY!

Contact Methods

Recent Profile Visitors

2,230 profile views

Vach's Achievements

Poring

Poring (1/15)

19

Reputation

  1. As Emistry stated in this thread: http://rathena.org/board/topic/76129-get-memo-data-with-a-scripting-command/page__pid__169119#entry169119 There doesn't appear to be a function that shows the English map name (the one written down client side in the mapnametable). Does anyone know how to retrieve this with a script command using just the map file name?
  2. Got it working, here is the updated function and the script I used, in case anyone wants to use it for their server. I would vote that this be something added to the official stuff? Better written probably. It's a neat feature anyone could use for various reasons. //setmemo(i,s,i,i) - Changes memo 1,2,3 to the string indicated, at the coords indicated. BUILDIN_FUNC(setmemo) { TBL_PC *sd;// = script_rid2sd(st); int memo; int x,y; short mapid; //const char* mapname; //mapindex_name2id(str) sd = script_rid2sd(st); if( sd == NULL ) { ShowError("setmemo: Error, function called with no player attached to script.\n"); return 0; } memo = script_getnum(st,2); //mapname = script_getstr(st,3); mapid = mapindex_name2id(script_getstr(st,3)); x = script_getnum(st,4); y = script_getnum(st,5); if( !script_getstr(st,3) == C_STR || !script_getstr(st,3) == C_CONSTSTR ) { ShowError("setmemo: mapname sent not a string!\n"); script_pushint(st,0); return 0;// data type mismatch } if (!mapid) { ShowError("setmemo: mapname sent is not in proper format (remove '.gat')"); script_pushint(st,0); return 0; } if (memo > MAX_MEMOPOINTS || memo > 3) { ShowError("setmemo: Requested memo is higher than 3 or unavailable to player."); script_pushint(st,0); return 0; } if (!x || !y) { ShowError("setmemo: map x and/or y coords set to 0 or less!\n"); script_pushint(st,0); return 0; } //All checks complete, commense process. sd->status.memo_point[memo].map = mapid; sd->status.memo_point[memo].x = x; sd->status.memo_point[memo].y = y; script_pushint(st,1); // 1 is success. return 0; } Script choice: getmapxy(@mapname$,@mapx,@mapy,0); if (setmemo(1,@mapname$,@mapx,@mapy) == 1) { mes "..."; mes "Success!"; close; } The problem was the use of the function embedded into setting .map, apparently it did not configure properly. I made an error report anyway.
  3. So the "Manage Skill Damage_2.0 r17066.patch " uploaded by Angel is indeed working up to date with the current stuff?
  4. The in-game exit to windows is totally fine. As for everything else, I would think returning back to the initial (blank) login-screen would be desired behavior. If that's not possible at all, you could make it go back to the license accept screen - which would have to be enabled to work but could be used as a last resort.
  5. Vach

    max item limit

    I ran into some thing similar to this as well. I'm hoping it's not hard coded into the client.
  6. There is only 7 numbers in that entry, skill cast database entries have 8. I'm not sure how this is causing things to react on your server. Perhaps it is interpreting it as "default". I get error messages on mapserv when I screw up those lines.
  7. What about all that stuff Random said? All those changes? Does that fix the issue? Where is Lilith? XD
  8. What's the primary difference between this code and mine, at least in terms of functionality? The only main difference I see is setting the map index to a short and checking if the short is above 0 before setting the memo map. Have you tested it? The function I used in my npc script was "getmapxy" to find the map name... That might be the issue.
  9. Wow thanks! This totally put me on the right track, I ended up writing the following function: //setmemo(i,s,i,i) - Changes memo 1,2,3 to the string indicated, at the coords indicated. BUILDIN_FUNC(setmemo) { TBL_PC *sd;// = script_rid2sd(st); int memo; int x,y; const char* mapname; //mapindex_name2id(str) sd = script_rid2sd(st); if( sd == NULL ) { ShowError("setmemo: Error, function called with no player attached to script.\n"); return 0; } memo = script_getnum(st,2); mapname = script_getstr(st,3); x = script_getnum(st,4); y = script_getnum(st,5); if( !script_getstr(st,3) == C_STR || !script_getstr(st,3) == C_CONSTSTR ) { ShowError("setmemo: mapname sent not a string!\n"); script_pushint(st,0); return 0;// data type mismatch } if (memo > MAX_MEMOPOINTS || memo > 3) { ShowError("setmemo: Requested memo is higher than 3 or unavailable to player."); script_pushint(st,0); return 0; } if (!x || !y) { ShowError("setmemo: map x and/or y coords set to 0 or less!\n"); script_pushint(st,0); return 0; } //All checks complete, commense process. sd->status.memo_point[memo].map = mapindex_name2id(mapname); sd->status.memo_point[memo].x = x; sd->status.memo_point[memo].y = y; script_pushint(st,1); // 1 is success. return 0; } Unfortunately, when used properly in an NPC script it crashes the server. I know it gets to the point where the variables are overwritten and that's when the map crash occurs, so it at least gets to that point. I was wondering if someone could point out the errors in there? EDIT: OH MAN THAT'S UGLY PASTED! My apologies... >_<''
  10. Skill cool-down is in skill_cast_db.txt, it's the 7th number in the list of numbers, the first being the skill ID. It's in milliseconds.
  11. Thanks Annie. HEY EVERYBODY IN SOURCE SUPPORT! Anyone know how to do something like this? I'm still learning the source and making new script commands is definitely something I'm a novice at. The source that Annie introduced in skill.c seems like the point where the memos are called and used to warp to... I would need to edit them and keep this part of the function intact. However: sd->status.memo_point[#].map seems to point to the data stored with the map information. I would need a script command to edit that? What about the coordinates? Or is editing this going to blow up the server?
  12. Hahaha, sounds good. I look forward tot he progress.
  13. Hmmm... I know how to make the script based warp points, using variables, but I want to be able to use the Warp Portal skill which requires the use and manipulation of the memo save data. The first thing I want to do is give more control of creating memos, so you don't just replace the first, but this is just the beginning. You're sure memos cants be modified while the player is connected? In that case I may want to move this to source support, because I would need help making a new script command... I'm hoping this isn't necessary, though.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use and Privacy Policy.