Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Engraving and deengraving changes #381

Merged
merged 1 commit into from
Dec 6, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 16 additions & 8 deletions vme/zone/midgaard.zon
Original file line number Diff line number Diff line change
Expand Up @@ -781,6 +781,8 @@ code
dilend /* wand_charge */

dilbegin deengrave();
external
integer IsInGuild@guilds(pc : unitptr, sGuild : string);
var
pc : unitptr;
ting : unitptr;
Expand Down Expand Up @@ -838,9 +840,15 @@ code
}

pause;
pris := (5*PLATINUM_MULT)+((ting.rent)*3);
if (IsInGuild@guilds(pc, GUILD_UDG_THIEF)){ // thieves guild discount
exec("wink " + pc.name,self);
pris := (5*SILVER_MULT)+((ting.rent)*3);
}else{
pris := (5*PLATINUM_MULT)+((ting.rent)*3);
}
cash := moneystring(pris,TRUE);
exec("say Removing this engraving will cost you "+cash+".",self);
pause;
if(not transfermoney(pc,self,pris))
{
exec("say ...which you don't have apparently.",self);
Expand Down Expand Up @@ -955,13 +963,13 @@ code

:brief:
exec("say What do you want engraved on this "+ting.name+", "+pc.name+"?",self);
exec("say Just say the line, and remember, maximum 12 letters!",self);
exec("say Just say the line, and remember, maximum 20 letters!",self);

:brieftext:
wait(SFB_DONE, command("say")and(activator == pc));
text := argument;
maxlength := 12;
if("&" in text){ // These all exist to allow engraving to work for special characters without eating up the maximum length. Also increasing Max length of engravings to 12
maxlength := 20;
if("&" in text){ // These all exist to allow engraving to work for special characters without eating up the maximum length. Also increasing Max length of engravings to 20
templist := split(text,"&");
maxlength := maxlength + ((length(templist)-1)*4);
}
Expand All @@ -980,7 +988,7 @@ code
if(length(text) > maxlength)
{
exec("say I am sorry, but this is too long!",self);
exec("say Try another one, 12 letters maximum.",self);
exec("say Try another one, 20 letters maximum.",self);
goto brieftext;
}

Expand Down Expand Up @@ -5512,7 +5520,7 @@ extra {"sign in the window","sign","window"}
------------------------------------------
Veejays Engraving Services

<div class='cpr'> Engraving (max.10 letters) : min. 5 GP</div><div class='cw'>
<div class='cpr'> Engraving (max.20 letters) : min. 5 GP</div><div class='cw'>

Note that the engraving cost increases sharply for magical items.
The engraving is permanent and cannot be removed or remade.
Expand Down Expand Up @@ -6214,8 +6222,8 @@ title "Reejay the deengraver"
descr "Reejay the deengraver sits at his table, hard at work."
extra {}
"A black-haired and dark-skinned woman, apparently not native to the city of
Midgaard. She is the best in his field and can offer you an engraving for
a reasonable price."
Midgaard. She is the best in his field and can remove an engraving for
an unreasonable price."
M_SHOP_KEEPER(47,SEX_FEMALE,RACE_HUMAN)
money 3 IRON_PIECE
flags {UNIT_FL_NO_TELEPORT}
Expand Down
Loading