Zesstra | 1862697 | 2017-01-31 10:38:27 +0100 | [diff] [blame] | 1 | process_string() |
| 2 | ================ |
| 3 | |
| 4 | process_string(E) |
| 5 | |
| 6 | FUNKTION |
| 7 | -------- |
Zesstra | 1862697 | 2017-01-31 10:38:27 +0100 | [diff] [blame] | 8 | |
| 9 | string process_string(string str) |
| 10 | string process_string(closure cl) |
| 11 | |
| 12 | BESCHREIBUNG |
| 13 | ------------ |
Zesstra | 1862697 | 2017-01-31 10:38:27 +0100 | [diff] [blame] | 14 | |
Zesstra | d5d2a6c | 2020-09-03 19:55:26 +0200 | [diff] [blame] | 15 | Beschreibung s. efun/process_string. |
Zesstra | 1862697 | 2017-01-31 10:38:27 +0100 | [diff] [blame] | 16 | |
Zesstra | d5d2a6c | 2020-09-03 19:55:26 +0200 | [diff] [blame] | 17 | Abweichend zu der Beschreibung gibt es im MG folgende wichtige Punkte: |
| 18 | |
| 19 | * nicht in neuem Code nutzen, aus altem Code ausbauen |
| 20 | * nicht nutzbar fuer Objekte mit einer UID mit einem Level > 30. |
| 21 | * nicht rufbar durch Magiershells |
| 22 | * kann Funktionen in anderen Objekten nur rufen, wenn diese zum gleichen |
| 23 | Magier gehoeren. |
Zesstra | 1862697 | 2017-01-31 10:38:27 +0100 | [diff] [blame] | 24 | |
Zesstra | d5d2a6c | 2020-09-03 19:55:26 +0200 | [diff] [blame] | 25 | Folgendes Properties und Details werden bei der Abfrage ueber |
| 26 | process_string() gefiltert: |
| 27 | |
| 28 | * P_LONG |
| 29 | * P_SHORT |
| 30 | * Details |
| 31 | * NPC-Chats |
| 32 | * P_INT_LONG |
| 33 | * P_INT_SHORT |
Zesstra | 1862697 | 2017-01-31 10:38:27 +0100 | [diff] [blame] | 34 | |
Zesstra | d5d2a6c | 2020-09-03 19:55:26 +0200 | [diff] [blame] | 35 | Die Nutzung kann zu Sicherheitsproblemen fuehren, siehe auch |
| 36 | process_call(). |
Zesstra | 1862697 | 2017-01-31 10:38:27 +0100 | [diff] [blame] | 37 | |
| 38 | BEISPIEL |
| 39 | -------- |
Zesstra | d5d2a6c | 2020-09-03 19:55:26 +0200 | [diff] [blame] | 40 | |
| 41 | .. code-block:: pike |
Zesstra | 1862697 | 2017-01-31 10:38:27 +0100 | [diff] [blame] | 42 | |
| 43 | // komplette Ersetzung ... |
| 44 | SetProp(P_LONG,"@@current_long@@"); |
| 45 | ... |
| 46 | string current_long() { |
| 47 | if(x) return(break_string("Die Beschreibung.")); |
| 48 | else return(break_string("Die andere Beschreibung.")); |
| 49 | } |
| 50 | |
| 51 | -> bei Abfrage: "Die Beschreibung." oder "Die andere Beschreibung." |
| 52 | |
Zesstra | 1862697 | 2017-01-31 10:38:27 +0100 | [diff] [blame] | 53 | // Teilersetzung |
| 54 | SetProp(P_SHORT, "Ein @@farbenfun|huebsch@@ Ding"); |
| 55 | ... |
| 56 | string farbenfun(string str) { |
| 57 | return(str+" "+"gelbes"); |
| 58 | } |
| 59 | |
| 60 | -> bei Abfrage: "Ein huebsch gelbes Ding." |
| 61 | |
Zesstra | d5d2a6c | 2020-09-03 19:55:26 +0200 | [diff] [blame] | 62 | |
Zesstra | 1862697 | 2017-01-31 10:38:27 +0100 | [diff] [blame] | 63 | SIEHE AUCH |
| 64 | ---------- |
Zesstra | 1862697 | 2017-01-31 10:38:27 +0100 | [diff] [blame] | 65 | |
Zesstra | d5d2a6c | 2020-09-03 19:55:26 +0200 | [diff] [blame] | 66 | :doc:`process_call`, :doc:`replace_personal` |
Zesstra | 1862697 | 2017-01-31 10:38:27 +0100 | [diff] [blame] | 67 | |
Zesstra | d5d2a6c | 2020-09-03 19:55:26 +0200 | [diff] [blame] | 68 | 02.09.2020 Zesstra |
Zesstra | 1862697 | 2017-01-31 10:38:27 +0100 | [diff] [blame] | 69 | |